-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.js
35 lines (33 loc) · 946 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
30
31
32
33
34
35
const { defaults: tsjPreset } = require("ts-jest/presets")
const thirdPartyIgnorePatterns = [
"((jest-)?react-native|@react-native(-community)?)",
"expo(nent)?",
"@expo(nent)?/.*",
"@expo-google-fonts/.*",
"react-navigation",
"@react-navigation/.*",
"@unimodules/.*",
"unimodules",
"sentry-expo",
"native-base",
"react-native-svg",
"react-clone-referenced-element",
"react-native-code-push",
]
/** @type {import('@jest/types').Config.ProjectConfig} */
module.exports = {
...tsjPreset,
preset: "jest-expo",
transformIgnorePatterns: [
`<rootDir>/node_modules/(?!${thirdPartyIgnorePatterns.join("|")})`,
"jest-runner",
],
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/.maestro/", "@react-native"],
testEnvironment: "jsdom",
setupFiles: ["<rootDir>/test/setup.ts"],
transform:{
'^.+\\.test.tsx?$': ['ts-jest', {
tsconfig: '<rootDir>/test/test-tsconfig.json'
}]
}
}