blob: 282bda60d87b6d880c2f716405001eabc67c2e7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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'],
globals: {
"ts-jest": {
"tsConfig": "./tsconfig.build.json"
}
},
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/src/$1',
},
};
|