diff --git a/packages/app/src/app/components/Preview/DevTools/Tests/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tests/index.tsx index f500a27d5e9..7a905529dc9 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tests/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tests/index.tsx @@ -12,7 +12,7 @@ import TestDetailsContent from './TestDetails'; import TestSummary from './TestSummary'; import TestOverview from './TestOverview'; import { DevToolProps } from '..'; -import { messages } from './../../../../../../src/sandbox/eval/tests/jest-lite'; +import { messages } from '@codesandbox/common/lib/utils/jest-lite'; export type IMessage = { type: 'message' | 'command' | 'return'; diff --git a/packages/app/src/sandbox/eval/tests/jest-lite.ts b/packages/app/src/sandbox/eval/tests/jest-lite.ts index 8d8f7aa4af8..902cbe34a1a 100644 --- a/packages/app/src/sandbox/eval/tests/jest-lite.ts +++ b/packages/app/src/sandbox/eval/tests/jest-lite.ts @@ -1,5 +1,7 @@ import { dispatch, actions, listen } from 'codesandbox-api'; import { react, reactTs } from '@codesandbox/common/lib/templates'; +import { messages } from '@codesandbox/common/lib/utils/jest-lite'; + import expect from 'jest-matchers'; import jestMock from 'jest-mock'; import jestTestHooks from 'jest-circus'; @@ -87,20 +89,6 @@ function resetTestState() { setState(INITIAL_STATE); } -export enum messages { - INITIALIZE = 'initialize_tests', - ADD_FILE = 'add_file', - REMOVE_FILE = 'remove_file', - FILE_ERROR = 'file_error', - TOTAL_TEST_START = 'total_test_start', - TOTAL_TEST_END = 'total_test_end', - TEST_START = 'test_start', - TEST_END = 'test_end', - DESCRIBE_START = 'describe_start', - DESCRIBE_END = 'describe_end', - ADD_TEST = 'add_test', -} - export default class TestRunner { tests: Array; ranTests: Set; diff --git a/packages/common/src/utils/jest-lite.ts b/packages/common/src/utils/jest-lite.ts new file mode 100644 index 00000000000..ca5ca435d39 --- /dev/null +++ b/packages/common/src/utils/jest-lite.ts @@ -0,0 +1,13 @@ +export enum messages { + INITIALIZE = 'initialize_tests', + ADD_FILE = 'add_file', + REMOVE_FILE = 'remove_file', + FILE_ERROR = 'file_error', + TOTAL_TEST_START = 'total_test_start', + TOTAL_TEST_END = 'total_test_end', + TEST_START = 'test_start', + TEST_END = 'test_end', + DESCRIBE_START = 'describe_start', + DESCRIBE_END = 'describe_end', + ADD_TEST = 'add_test', +}