forked from akveo/react-native-ui-kitten
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (31 loc) · 892 Bytes
/
jest.config.js
File metadata and controls
32 lines (31 loc) · 892 Bytes
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
const { defaults: tsJestConfig } = require('ts-jest/presets');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const tsConfig = require('./tsconfig.dev');
module.exports = {
...tsJestConfig,
preset: 'react-native',
transform: {
...tsJestConfig.transform,
'\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
},
globals: {
'ts-jest': {
babelConfig: true,
tsConfig: './tsconfig.test.json',
},
},
cacheDirectory: './dist/jest/cache',
coverageDirectory: './dist/jest/coverage',
snapshotResolver: '<rootDir>/jest.config.snapshot',
moduleNameMapper: pathsToModuleNameMapper(tsConfig.compilerOptions.paths, {
prefix: '<rootDir>/',
}),
modulePathIgnorePatterns: [
'<rootDir>/src/playground/',
],
testPathIgnorePatterns: [
'<rootDir>/node_modules',
'<rootDir>/dist',
'<rootDir>/docs',
],
};