forked from jupyterlab/jupyterlab-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
29 lines (27 loc) · 913 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
var tsConfig = require('./tsconfig.json');
var tsOptions = tsConfig['compilerOptions'];
// Need as the test folder is not visible from the src folder
tsOptions['rootDir'] = null;
tsOptions['inlineSourceMap'] = true;
module.exports = {
automock: false,
moduleNameMapper: {
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
'\\.(svg)$': '<rootDir>/testutils/jest-file-mock.js'
},
preset: 'ts-jest/presets/js-with-babel',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePathIgnorePatterns: [
'<rootDir>/jupyterlab_git',
'<rootDir>/jupyter-config'
],
setupFiles: ['<rootDir>/testutils/jest-setup-files.js'],
testPathIgnorePatterns: ['/lib/', '/node_modules/', '/jupyterlab_git/'],
testRegex: '/tests/.*.spec.ts[x]?$',
transformIgnorePatterns: ['/node_modules/(?!(@jupyterlab/.*)/)'],
globals: {
'ts-jest': {
tsconfig: tsOptions
}
}
};