-
Notifications
You must be signed in to change notification settings - Fork 18
/
jest.config.js
49 lines (45 loc) · 1.06 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
const jestJupyterLab = require('@jupyterlab/testutils/lib/jest-config');
const jlabConfig = jestJupyterLab('@jupyterlab/pullrequests', __dirname);
const esModules = [
'.*@jupyterlab/',
'lib0',
'react-spinners',
'y\\-protocols',
'y\\-websocket',
'yjs'
].join('|');
const {
coverageDirectory,
moduleFileExtensions,
moduleNameMapper,
preset,
setupFilesAfterEnv,
setupFiles,
testPathIgnorePatterns,
transform
} = jlabConfig;
module.exports = {
moduleFileExtensions,
moduleNameMapper,
preset,
setupFilesAfterEnv,
setupFiles,
testPathIgnorePatterns: [
...testPathIgnorePatterns,
'/jupyterlab_pullrequests'
],
transform,
automock: false,
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/*.d.ts'],
coverageDirectory: 'coverage',
coverageReporters: ['lcov', 'text'],
reporters: ['default'],
testRegex: 'src/tests/.*.spec.ts[x]?$',
transformIgnorePatterns: [`/node_modules/(?!${esModules}).+`],
setupFiles: ['<rootDir>/setupJest.js'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json'
}
}
};