-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjest.config.js
38 lines (38 loc) · 927 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
36
37
38
module.exports = {
preset: "react-native",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
transformIgnorePatterns: [
"node_modules/(?!(" +
"react-native|" +
"@react-native|" +
"@xenova/transformers|" +
"text-encoding-polyfill" +
")/)",
],
setupFiles: [
"./node_modules/react-native/jest/setup.js",
"./src/__tests__/setup.js",
],
testRegex: "(/__tests__/.*(?<!setup)\\.(test|spec))\\.[jt]sx?$",
testEnvironment: "node",
transform: {
"^.+\\.(js|jsx|ts|tsx)$": [
"babel-jest",
{ configFile: "./babel.config.js" },
],
},
globals: {
"ts-jest": {
babelConfig: true,
tsconfig: "tsconfig.json",
},
},
collectCoverage: true,
coverageDirectory: "coverage",
coverageReporters: ["text", "lcov"],
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts",
"!src/__tests__/**",
],
};