-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
49 lines (44 loc) · 1.21 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");
/** @type {import('ts-jest').JestConfigWithTsJest} **/
const baseConfig = jestJupyterLab(__dirname);
const esModules = [
"@codemirror",
"@jupyter/ydoc",
"@jupyterlab/",
"@jupyter/",
"@microsoft/",
"lib0",
"exenv-es6",
"nanoid",
"vscode-ws-jsonrpc",
"y-protocols",
"y-websocket",
"yjs",
"@rjsf",
"@xyflow/",
"@waldiez/react/",
].join("|");
module.exports = {
...baseConfig,
globals: {
NODE_ENV: "test",
},
testEnvironment: "jsdom",
testRegex: "src/.*/.*.spec.ts[x]?$",
preset: "ts-jest",
automock: false,
collectCoverageFrom: ["src/**/*.{ts,tsx}", "!src/**/*.d.ts", "!src/**/.ipynb_checkpoints/*"],
transformIgnorePatterns: [
`<rootDir>/node_modules/(?!${esModules}).+`,
`<rootDir>/.venv/`,
`<rootDir>/jest.setup.ts`,
],
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
testPathIgnorePatterns: ["dist"],
modulePaths: ["<rootDir>/src", "<rootDir>/node_modules"],
roots: ["src"],
moduleNameMapper: {
yjs: "<rootDir>/node_modules/yjs",
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
},
};