mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 09:13:52 +01:00
b277975656
* Fix the type declaration of `!!raw-loader!` modules. Instead of declaring them to export an object with a single key `default` which is a string, the modules have a default export, which is a string. Note, that this doesn't actually change the generated code, just the types that typescript sees. The code worked before because the only thing done to the values was to coerce the values to a string, which turned into a no-op. * Switch from using `raw-loader` to using a source asset module. `raw-loader` was deprecated in webpack v5.
24 lines
1014 B
JavaScript
24 lines
1014 B
JavaScript
module.exports = {
|
|
roots: ["<rootDir>/src/", "<rootDir>/test/"],
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
|
|
transform: {
|
|
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
|
|
},
|
|
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
|
|
testPathIgnorePatterns: [".cypress", "node_modules", "dist"],
|
|
testEnvironment: "./FixJSDOMEnvironment.ts",
|
|
setupFiles: ["./jest.polyfills.js"],
|
|
moduleNameMapper: {
|
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
|
"<rootDir>/test/__mocks__/fileMock.js",
|
|
"\\.(css|less)$": "<rootDir>/test/__mocks__/NullMock.js",
|
|
".*?raw$": "<rootDir>/test/__mocks__/fileMock.js",
|
|
"@player": "<rootDir>/src/Player",
|
|
"@enums": "<rootDir>/src/Enums",
|
|
"@nsdefs": "<rootDir>/src/ScriptEditor/NetscriptDefinitions",
|
|
"^monaco-editor$": "<rootDir>/test/__mocks__/NullMock.js",
|
|
"^monaco-vim$": "<rootDir>/test/__mocks__/NullMock.js",
|
|
"/utils/Protections$": "<rootDir>/test/__mocks__/NullMock.js",
|
|
},
|
|
};
|