-
-
Notifications
You must be signed in to change notification settings - Fork 237
Expand file tree
/
Copy pathjest.config.js
More file actions
38 lines (37 loc) · 778 Bytes
/
jest.config.js
File metadata and controls
38 lines (37 loc) · 778 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
28
29
30
31
32
33
34
35
36
37
38
/** @type {import('jest').Config} */
const config = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
// setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
transform: {
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.test.json',
isolatedModules: false,
},
],
},
moduleNameMapper: {
'^react-native$': '<rootDir>/src/__tests__/__mocks__/react-native.ts',
},
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/__tests__/**',
'!src/**/*.nitro.ts',
],
coverageThreshold: {
global: {
statements: 90,
branches: 80,
functions: 80,
lines: 90,
},
},
testMatch: [
'<rootDir>/src/**/?(*.)+(spec|test).ts?(x)',
'<rootDir>/__tests__/**/?(*.)+(spec|test).ts?(x)',
],
}
module.exports = config