-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
30 lines (27 loc) Β· 946 Bytes
/
jest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import { compilerOptions } from "./tsconfig.paths.json";
import { JestConfigWithTsJest, pathsToModuleNameMapper } from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
clearMocks: true,
roots: ['<rootDir>'],
modulePaths: [compilerOptions.baseUrl],
moduleDirectories: ["node_modules", "<rootDir>"],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.(css|less|sass|scss|png|jpg|gif|ttf|woff|woff2|svg)$": "jest-transform-stub"
},
moduleNameMapper:{
...pathsToModuleNameMapper(compilerOptions.paths, {prefix: '<rootDir>/'}),
'\\.(ttf|woff|eot|jpg|png|png)$': '<rootDir>/utils/tests/__ mocks __/fileMock.js',
},
testPathIgnorePatterns: [
"\\\\node_modules\\\\",
"\\\\.vscode\\\\",
]
};
export default jestConfig;