-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
41 lines (41 loc) · 1.09 KB
/
Copy pathjest.config.js
File metadata and controls
41 lines (41 loc) · 1.09 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
33
34
35
36
37
38
39
40
41
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: 'node',
// Specs use virtual module mocks (expo-router, @react-navigation/native) for
// the same ids across files. Run serially so the mock registry is
// deterministic and never races across parallel workers.
maxWorkers: 1,
roots: ['<rootDir>/src'],
testMatch: ['**/*.spec.ts', '**/*.spec.tsx'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
module: 'commonjs',
moduleResolution: 'node',
jsx: 'react-jsx',
esModuleInterop: true,
},
},
],
},
// Coverage is scoped to the code changed for the Expo Router 6 migration.
collectCoverageFrom: [
'src/shared/navigation-runtime.ts',
'src/adapters/react-navigation-adapter.ts',
'src/adapters/expo-router-adapter.ts',
'src/tree-builder.ts',
'src/state-differ.ts',
'src/sitemap-builder.ts',
'src/useNavigationInspectorNative.ts',
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
}