-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathjest.config.js
More file actions
41 lines (41 loc) · 978 Bytes
/
jest.config.js
File metadata and controls
41 lines (41 loc) · 978 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
39
40
41
export default {
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
transform: {
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
tsconfig: {
compilerOptions: {
module: 'commonjs',
target: 'es2017',
strict: false,
esModuleInterop: true,
skipLibCheck: true,
},
},
},
],
},
testMatch: [
'**/__tests__/**/*.test.(ts|tsx|js)',
],
testPathIgnorePatterns: [
'/node_modules/',
'/lib/',
'/plugin/build/',
'/nitrogen/generated/',
],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.nitro.ts',
],
setupFiles: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
'^react-native$': '<rootDir>/node_modules/react-native',
// Map .js extensions to .ts files for ES module imports in tests
'^(\\.{1,2}/.*)\\.js$': '$1',
},
}