-
Notifications
You must be signed in to change notification settings - Fork 5
/
jest.config.js
44 lines (41 loc) · 1.39 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const testsForPackage = (packageName) => `<rootDir>/packages/${packageName}/**/*.test.[jt]s?(x)`
const project = (displayName, packageNames, config = {}) => ({
roots: ['<rootDir>/packages'],
displayName,
testMatch: packageNames.map(testsForPackage),
...config
})
const extensions = 'js,jsx,ts,tsx'
module.exports = {
preset: 'jest-expo',
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|native-base|react-native-svg)'
],
collectCoverageFrom: [
`**/packages/*/**/*.{${extensions}}`,
`!**/*.test.{${extensions}}`,
`!**/*.test-*.{${extensions}}`,
'!**/*.d.ts',
'!**/dist/**',
'!**/packages/js/**',
'!<rootDir>/packages/plugin-angular/**/*',
'!<rootDir>/packages/expo-cli/lib/test/fixtures/**/*',
'!<rootDir>/packages/expo-cli/lib/test/lib/**/*',
'!<rootDir>/packages/react-native/src/test/setup.js',
'!<rootDir>/packages/plugin-node-surrounding-code/test/fixtures/**/*'
],
coverageReporters: [
'json-summary', 'json', 'lcov', 'text', 'clover'
],
projects: [
project('expo', [
'delivery-expo',
'expo',
'expo-cli',
'plugin-expo-app',
'plugin-expo-device',
'plugin-expo-app-state-breadcrumbs',
'plugin-expo-connectivity-breadcrumbs'
])
]
}