-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (31 loc) · 1.13 KB
/
jest.config.js
File metadata and controls
32 lines (31 loc) · 1.13 KB
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
/*
* Copyright (c) 2024, 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
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
// eslint-disable-next-line @typescript-eslint/no-var-requires
const base = require('@salesforce/pwa-kit-dev/configs/jest/jest.config.js')
module.exports = {
...base,
moduleNameMapper: {
...base.moduleNameMapper,
'^react$': '<rootDir>/node_modules/react/index.js',
'^react-router-dom(.*)$': '<rootDir>/node_modules/react-router-dom/index.js'
// Add more mappings as needed for this package
},
transformIgnorePatterns: ['/node_modules/'],
setupFilesAfterEnv: [path.join(__dirname, 'jest-setup.js')],
collectCoverageFrom: ['src/**/*.{js,jsx}', '!node_modules/**'],
coverageThreshold: {
global: {
statements: 73,
branches: 60,
functions: 65,
lines: 74
}
},
...(process.env.CI ? {testTimeout: 30000} : {})
}