forked from reduxjs/redux-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
21 lines (21 loc) · 828 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
module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
testMatch: ['<rootDir>/src/**/*.(spec|test).[jt]s?(x)'],
moduleNameMapper: {
'^@reduxjs/toolkit$': '<rootDir>/src/index.ts', // @remap-prod-remove-line
'^@reduxjs/toolkit/query$': '<rootDir>/src/query/index.ts', // @remap-prod-remove-line
'^@reduxjs/toolkit/query/react$': '<rootDir>/src/query/react/index.ts', // @remap-prod-remove-line
// this mapping is disabled as we want `dist` imports in the tests only to be used for "type-only" imports which don't play a role for jest
//'^@reduxjs/toolkit/dist/(.*)$': '<rootDir>/src/*',
'^@internal/(.*)$': '<rootDir>/src/$1',
},
preset: 'ts-jest',
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
diagnostics: {
ignoreCodes: [6133],
},
},
},
}