2019-07-27 23:13:00 +08:00
|
|
|
module.exports = {
|
2019-12-22 07:43:27 +08:00
|
|
|
preset: "ts-jest",
|
2019-07-27 23:13:00 +08:00
|
|
|
moduleDirectories: ["node_modules"],
|
2019-12-25 07:53:17 +08:00
|
|
|
setupFiles: ["./test/src/setup.js", "jest-canvas-mock"],
|
2019-12-25 07:17:02 +08:00
|
|
|
roots: ["./src", "./test"],
|
2020-05-30 12:06:08 +08:00
|
|
|
modulePathIgnorePatterns: [
|
|
|
|
"/node_modules/",
|
|
|
|
// Ignore prs-rs browser package and only use testing package.
|
|
|
|
"/src/core/data_formats/compression/prs/pkg",
|
|
|
|
],
|
2019-12-22 07:43:27 +08:00
|
|
|
moduleNameMapper: {
|
|
|
|
"\\.(css|gif|jpg|png|svg|ttf)$": "<rootDir>/src/__mocks__/static_files.js",
|
2019-12-25 07:17:02 +08:00
|
|
|
"^monaco-editor$": "<rootDir>/node_modules/monaco-editor/esm/vs/editor/editor.main.js",
|
|
|
|
"^worker-loader!": "<rootDir>/src/__mocks__/webworkers.js",
|
2019-12-22 07:43:27 +08:00
|
|
|
},
|
2020-01-26 05:38:07 +08:00
|
|
|
globals: {
|
|
|
|
"ts-jest": {
|
|
|
|
isolatedModules: true,
|
|
|
|
},
|
|
|
|
},
|
2019-12-22 07:43:27 +08:00
|
|
|
};
|