2021-08-27 01:24:29 +02:00
|
|
|
module.exports = {
|
2023-04-01 13:45:23 +02:00
|
|
|
roots: ["<rootDir>/src/", "<rootDir>/test/"],
|
2021-09-05 01:09:30 +02:00
|
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
|
|
|
|
transform: {
|
2024-09-10 03:36:00 +02:00
|
|
|
"^.+\\.(js|jsx|ts|tsx|cjs|mjs)$": "<rootDir>/test/jest/config/babelTransform.js",
|
2021-09-05 01:09:30 +02:00
|
|
|
},
|
2023-07-12 23:10:52 +02:00
|
|
|
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
|
2022-04-07 01:30:08 +02:00
|
|
|
testPathIgnorePatterns: [".cypress", "node_modules", "dist"],
|
2023-04-01 13:45:23 +02:00
|
|
|
testEnvironment: "./FixJSDOMEnvironment.ts",
|
2024-03-04 12:10:18 +01:00
|
|
|
setupFiles: ["./jest.polyfills.js"],
|
2022-01-19 16:51:36 +01:00
|
|
|
moduleNameMapper: {
|
2022-04-07 01:30:08 +02:00
|
|
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
|
|
|
"<rootDir>/test/__mocks__/fileMock.js",
|
2023-12-16 11:03:52 +01:00
|
|
|
"\\.(css|less)$": "<rootDir>/test/__mocks__/NullMock.js",
|
2024-07-07 09:08:33 +02:00
|
|
|
".*?raw$": "<rootDir>/test/__mocks__/fileMock.js",
|
2022-10-19 18:45:40 +02:00
|
|
|
"@player": "<rootDir>/src/Player",
|
2023-06-12 06:34:20 +02:00
|
|
|
"@enums": "<rootDir>/src/Enums",
|
2024-09-10 03:36:00 +02:00
|
|
|
"@nsdefs": "<rootDir>/src/ScriptEditor/NetscriptDefinitions.d.ts",
|
2023-12-16 11:03:52 +01:00
|
|
|
"^monaco-editor$": "<rootDir>/test/__mocks__/NullMock.js",
|
|
|
|
"^monaco-vim$": "<rootDir>/test/__mocks__/NullMock.js",
|
|
|
|
"/utils/Protections$": "<rootDir>/test/__mocks__/NullMock.js",
|
2024-07-14 23:47:10 +02:00
|
|
|
"@swc/wasm-web": "@swc/core",
|
2022-04-07 01:30:08 +02:00
|
|
|
},
|
2021-08-27 01:24:29 +02:00
|
|
|
};
|