-
-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy pathjest.config.js
More file actions
35 lines (34 loc) · 779 Bytes
/
jest.config.js
File metadata and controls
35 lines (34 loc) · 779 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
/** @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: 95,
branches: 90,
functions: 90,
lines: 95,
},
},
testMatch: ['<rootDir>/src/**/?(*.)+(spec|test).ts?(x)'],
};
module.exports = config;