-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (26 loc) · 674 Bytes
/
jest.config.js
File metadata and controls
27 lines (26 loc) · 674 Bytes
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
const path = require('path')
const { jsWithTs } = require('ts-jest/presets')
/**
* @see {@link https://huafu.github.io/ts-jest/user/config/}
*/
module.exports = {
verbose: true,
collectCoverage: true,
globals: {
NODE_ENV: 'test',
'ts-jest': {
diagnostics: false,
},
},
testEnvironment: 'jsdom',
rootDir: path.resolve(__dirname, './'),
moduleFileExtensions: ['tsx', 'jsx', 'js', 'ts'],
moduleNameMapper: {
'@/components/(.*)$': '<rootDir>/src/components/$1',
'\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules',
},
transform: {
...jsWithTs.transform,
},
setupFiles: ['jest-localstorage-mock'],
}