-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
54 lines (51 loc) · 1.23 KB
/
Copy pathjest.config.js
File metadata and controls
54 lines (51 loc) · 1.23 KB
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
45
46
47
48
49
50
51
52
53
54
const { defaults: tsjPreset } = require('ts-jest/presets');
module.exports = {
...tsjPreset,
preset: 'jest-expo',
testEnvironment: 'node',
transform: {
// '^.+\\.tsx?$': 'ts-jest',
'^.+\\.(js)$': 'babel-jest',
'\\.(ts|tsx)$': 'ts-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'@bluebase/code-standards/jest/fileMock.js',
'^.+\\.(css|less|scss)$': '@bluebase/code-standards/jest/styleMock.js'
},
transformIgnorePatterns: [
'/node_modules/(?!ui-components|react-native).+\\.js$'
],
testPathIgnorePatterns: [
'\\.snap$',
'<rootDir>/node_modules/',
'<rootDir>/dist/'
],
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.{ts,tsx,js,jsx}',
'!src/**/*.stories.{ts,tsx,js,jsx}',
'!src/**/*.d.ts',
'!**/__stories__/**'
],
coverageThreshold: {
global: {
branches: 95,
functions: 95,
lines: 95,
statements: 95
}
},
coveragePathIgnorePatterns: ['.*\\.d\\.ts', '<rootDir>/node_modules/'],
watchPathIgnorePatterns: [
// 'src/*/output/**',
// 'output/'
],
cacheDirectory: '.jest/cache',
globals: {
'ts-jest': {
babelConfig: true
}
}
};