-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
23 lines (23 loc) · 895 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setUpTests.ts'],
testMatch: ["<rootDir>/src/**/*.test.{ts,tsx}"],
transform: {
"\\.(css|scss)$": "jest-css-modules-transform",
"^.+\\.svg$": "<rootDir>/__mocks__/svgTransform.js"
},
moduleNameMapper: {
"^@components(.*)$": "<rootDir>/src/components$1",
"^@utils(.*)$": "<rootDir>/src/utils$1",
"^@styles(.*)$": "<rootDir>/src/styles$1",
"^@store(.*)$": "<rootDir>/src/store$1",
"^@assets(.*)$": "<rootDir>/src/assets$1",
"^@typings(.*)$": "<rootDir>/src/typings$1",
"\\.(scss|css)$": "identity-obj-proxy",
},
moduleDirectories: ["node_modules", "<rootDir>/src", "<rootDir>/__mocks__"],
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx', 'node'],
resetMocks: true,
};