-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.mjs
More file actions
29 lines (28 loc) · 931 Bytes
/
jest.config.mjs
File metadata and controls
29 lines (28 loc) · 931 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
const config = {
preset: 'react-native',
testEnvironment: 'jsdom',
roots: ['<rootDir>/test'],
transform: {
'^.+.[tj]sx?$': 'babel-jest'
},
transformIgnorePatterns: ['/node_modules/(?!(react-native|@react-native|@react-navigation))'],
moduleNameMapper: {
'^@mmomtchev/react-native-settings$': '<rootDir>/src',
'^asap/+.*$': '<rootDir>/test/asap.js'
},
globals: {
'ts-jest': {
tsconfig: {
outDir: './.ts-jest'
}
}
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', '<rootDir>/test/mock.ts'],
testRegex: '/test/.*\\.test\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
collectCoverageFrom: ['./src/**'],
coverageReporters: ['json', 'lcov', 'text', 'clover']
};
export default config;