forked from murilo-campaner/react-native-picker-modal-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (36 loc) · 847 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
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig');
module.exports = {
"preset": "react-native",
"testRegex": "(/__tests__/.*| (\\.| /)(test|spec))\\.(ts?|tsx?)$",
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js",
"^.+\\.tsx?$": "ts-jest"
},
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"roots": [
"<rootDir>"
],
"modulePathIgnorePatterns": ["<rootDir>/example"],
"globals": {
"ts-jest": {
"tsConfig": "./tsconfig.json"
}
},
"moduleNameMapper": pathsToModuleNameMapper(compilerOptions.paths /*, { prefix: '<rootDir>/' } */),
"modulePaths": [
"<rootDir>"
],
"testEnvironment": "jsdom",
"setupFiles": [
"./setupTests.ts"
],
"setupFilesAfterEnv": ["<rootDir>/setupTests.ts"]
};