diff --git a/web/src/components/strategy/CodeStrategyEditor.dom.test.tsx b/web/src/components/strategy/CodeStrategyEditor.dom.test.tsx new file mode 100644 index 0000000..8d692fa --- /dev/null +++ b/web/src/components/strategy/CodeStrategyEditor.dom.test.tsx @@ -0,0 +1,74 @@ +// @vitest-environment jsdom +import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'; +import { fireEvent, render, screen, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { CodeStrategyEditor } from './CodeStrategyEditor'; + +const { createTradeProfileMock } = vi.hoisted(() => ({ + createTradeProfileMock: vi.fn(), +})); + +vi.mock('@monaco-editor/react', () => ({ + default: ({ value, onChange }: any) => ( +