diff options
Diffstat (limited to 'jb-ui/jest.config.ts')
| -rw-r--r-- | jb-ui/jest.config.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/jb-ui/jest.config.ts b/jb-ui/jest.config.ts new file mode 100644 index 0000000..f4dba3e --- /dev/null +++ b/jb-ui/jest.config.ts @@ -0,0 +1,22 @@ +// Configures Jest, the testing engine +// -- Sets test environment, module resolution, and TS integration via ts-jest. +// -- Must align with tsconfig.json and sometimes vite.config.mts. +// -- Must match paths and module resolution from tsconfig.json. +// -- Uses ts-jest to compile TS like Vite does. + +export default { + preset: 'ts-jest', + testEnvironment: 'jsdom', + // setupFilesAfterEnv: ['./setupTests.ts'], + transform: { + '^.+\\.tsx?$': ['ts-jest', { + tsconfig: 'tsconfig.json', + diagnostics: false, + }], + }, + moduleNameMapper: { + '\\.(css|less|scss|sass)$': 'identity-obj-proxy', + '^@/(.*)$': '<rootDir>/src/$1', + }, + +};
\ No newline at end of file |
