-
Notifications
You must be signed in to change notification settings - Fork 14
/
jest.config.js
35 lines (34 loc) · 1.02 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
/*
* Copyright 2021 Harness Inc. All rights reserved.
* Use of this source code is governed by the PolyForm Shield 1.0.0 license
* that can be found in the licenses directory at the root of this repository, also available at
* https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt.
*/
process.env.TZ = 'UTC'
module.exports = {
globals: {
'ts-jest': {
isolatedModules: true
}
},
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/_stories/**',
'!src/**/*.test.{ts,tsx}',
'!src/**/*.stories.{ts,tsx}',
'!src/**/__tests__/**'
],
coverageReporters: ['lcov'],
setupFilesAfterEnv: ['<rootDir>/jest/setup-file.js'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.jsx?$': 'ts-jest'
},
moduleDirectories: ['node_modules', 'src'],
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
moduleNameMapper: {
'\\.css$': 'identity-obj-proxy',
'\\.svg$': '<rootDir>/jest/svg-mock.js'
},
transformIgnorePatterns: ['node_modules/(?!(date-fns|lodash-es)/)']
}