-
Notifications
You must be signed in to change notification settings - Fork 114
/
jest.config.js
29 lines (29 loc) · 954 Bytes
/
jest.config.js
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
module.exports = {
testEnvironment: 'jsdom',
testPathIgnorePatterns: [
"/node_modules/",
"/dist/",
"/platforms/",
"/plugins/",
"/lib/",
],
preset: 'react-native',
transform: {
"^.+\\.(ts|tsx|js|jsx)$": "babel-jest"
},
transformIgnorePatterns: [
"node_modules/(?!((enketo-transformer/dist/enketo-transformer/web)|(jest-)?react-native(-.*)?|@react-native(-community)?|e-mission-common)/)"
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
moduleDirectories: ["node_modules", "src"],
globals: {"__DEV__": false},
setupFiles: ["<rootDir>/www/__mocks__/setupJestEnv.js"],
collectCoverage: true,
collectCoverageFrom: [
"www/js/**/*.{ts,tsx,js,jsx}",
"!www/js/**/index.{ts,tsx,js,jsx}",
"!www/js/types/**/*.{ts,tsx,js,jsx}",
],
// several functions in commHelper do not have unit tests; see note in commHelper.test.ts
coveragePathIgnorePatterns: ['www/js/services/commHelper.ts'],
};