-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
41 lines (38 loc) · 1.01 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
const jestJupyterLab = require('@jupyterlab/testutils/lib/jest-config');
const esModules = [
'@codemirror',
'@jupyter/react-components',
'@jupyter/web-components',
'@jupyter/ydoc',
'@jupyterlab/',
'@microsoft/',
'lib0',
'nanoid',
'vscode-ws-jsonrpc',
'y-protocols',
'y-websocket',
'yjs',
'exenv-es6'
].join('|');
const baseConfig = jestJupyterLab(__dirname);
module.exports = {
...baseConfig,
automock: false,
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|tsx)?$',
transformIgnorePatterns: [`./node_modules/(?!${esModules}).+`],
transform: {
'^.+\\.tsx?$': 'babel-jest',
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
'^.+\\.css$': 'jest-css-modules-transform'
},
roots: ['<rootDir>/src'],
moduleNameMapper: {
'\\.svg$': '<rootDir>/src/__mocks__/svgMock.js',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy'
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironmentOptions: {
customExportConditions: [''],
testUrl: 'http://localhost'
}
};