mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 02:02:08 +00:00
Migrate all tests to TypeScript (#19)
* Merge 2 npm repos * Install ts-jest * Update jestconfig * Fix jest types * jest fix * Fix babel config ref issue * Fix import * Fix import meta issue * fix generate * Skip multi-user tests
This commit is contained in:
21
jest.config.ts
Normal file
21
jest.config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { JestConfigWithTsJest } from "ts-jest";
|
||||
|
||||
const jestConfig: JestConfigWithTsJest = {
|
||||
testEnvironment: "jsdom",
|
||||
transform: {
|
||||
'^.+\\.m?[tj]sx?$': ["ts-jest", {
|
||||
tsconfig: "./tsconfig.json",
|
||||
babelConfig: "./babel.config.json",
|
||||
}],
|
||||
},
|
||||
setupFiles: ["./tests-ui/globalSetup.ts"],
|
||||
setupFilesAfterEnv: ["./tests-ui/afterSetup.ts"],
|
||||
clearMocks: true,
|
||||
resetModules: true,
|
||||
testTimeout: 10000,
|
||||
moduleNameMapper: {
|
||||
"^src/(.*)$": "<rootDir>/src/$1",
|
||||
},
|
||||
};
|
||||
|
||||
export default jestConfig;
|
||||
Reference in New Issue
Block a user