-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
41 lines (39 loc) · 1.18 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
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
const path = require('path')
const base = require('pwa-kit-build/configs/jest/jest.config.js')
module.exports = {
...base,
moduleNameMapper: {
...base.moduleNameMapper,
'^react-router-dom(.*)$': '<rootDir>/node_modules/react-router-dom/index.js'
},
setupFilesAfterEnv: [...base.setupFilesAfterEnv, path.join(__dirname, 'jest-setup.js')],
collectCoverageFrom: [
'app/**/*.{js,jsx}',
'non-pwa/**/*.{js,jsx}',
'worker/**/*.{js,jsx}',
'scripts/generator/*.{js,jsx}',
'!app/pages/test-container/**/*.{js,jsx}',
'!app/utils/test-utils.js',
'!app/commerce-api/mocks/*js',
'!app/main.jsx',
'!app/loader.js',
'!app/ssr.js',
'!app/static/**',
'!app/theme/**',
'!node_modules/**'
],
coverageThreshold: {
global: {
statements: 80,
branches: 72,
functions: 78,
lines: 83
}
}
}