forked from player-ui/player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
53 lines (51 loc) · 1.3 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
const path = require('path');
const LOCAL_VSCODE = process.env.CI === 'vscode-jest-tests';
module.exports = {
reporters: [
'default',
'jest-junit',
path.join(__dirname, 'tools', 'jest-coverage-mapper.js'),
],
coverageDirectory: 'coverage/',
collectCoverage: !LOCAL_VSCODE,
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'],
coverageReporters: ['cobertura', 'html', 'lcov', 'json-summary'],
transform: {
'^.+\\.[jt]sx?$': [
'babel-jest',
{ configFile: path.join(__dirname, 'babel.config.js') },
],
},
setupFilesAfterEnv: [path.join(__dirname, 'tools', 'jest-setup.js')],
testEnvironment: process.env.testEnvironment ?? 'jsdom',
maxWorkers: '50%',
haste: {
enableSymlinks: true,
},
watchman: false,
passWithNoTests: true,
testPathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/helpers/',
'test-utils',
'_backup',
],
collectCoverageFrom: [
'**/src/**',
'!**/*.json',
'!**/theme.*',
'!**/*.stories.*',
'!**/*.snippet.*',
'!**/__tests__/**',
'!**/*.snap',
'!**/dist/**',
'!**/jest-test.sh.runfiles/**',
'!**/test-utils/*.ts',
'!**/perf-ui/**',
'!**/perf-core/**',
'!**/_backup/**',
],
automock: false,
transformIgnorePatterns: ['node-modules', '!mdast-util-from-markdown'],
};