-
Notifications
You must be signed in to change notification settings - Fork 5
/
jest.config.js
52 lines (51 loc) · 1.17 KB
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
bail: true,
clearMocks: true,
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'jest.setup.js'
],
coverageReporters: [
'json',
'text',
'lcov',
'clover'
],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.json'
}
},
moduleFileExtensions: [
'js',
'json',
'jsx',
'ts',
'tsx',
'node'
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/mocks.js',
'\\.(css|less|scss)$': '<rootDir>/__mocks__/mocks.js'
},
preset: 'ts-jest',
rootDir: 'test',
// setupFiles: [ '<rootDir>/jest.setup.js' ],
globalSetup: '<rootDir>/jest-global-setup.js',
globalTeardown: '<rootDir>/jest-global-teardown.js',
testEnvironment: '<rootDir>/jest-environment.js',
testMatch: [
'**/?(*.)+(spec|test).[tj]s?(x)'
],
testPathIgnorePatterns: [
'./.next/',
'./node_modules/'
],
transformIgnorePatterns: [
'/node_modules/'
],
verbose: true,
}