-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
36 lines (36 loc) · 871 Bytes
/
jest.config.js
File metadata and controls
36 lines (36 loc) · 871 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
testPathIgnorePatterns: ['/node_modules/', '/lib/', 'setup\\.ts$'],
setupFilesAfterEnv: ['<rootDir>/__tests__/setup.ts'],
moduleNameMapper: {
'^react-native$': '<rootDir>/__mocks__/react-native.ts',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
verbatimModuleSyntax: false,
module: 'commonjs',
moduleResolution: 'node',
esModuleInterop: true,
},
},
],
},
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
],
coverageThreshold: {
global: {
branches: 60,
functions: 55,
lines: 64,
statements: 64,
},
},
};