diff --git a/jest.config.js b/jest.config.js index 22f371dcd..25c9858c2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,5 +9,6 @@ module.exports = { "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/test/__mocks__/fileMock.js", "\\.(css|less)$": "/test/__mocks__/styleMock.js", + "\\!!raw-loader!.*$": "/test/__mocks__/rawLoader.js", }, }; diff --git a/src/RemoteFileAPI/MessageHandlers.ts b/src/RemoteFileAPI/MessageHandlers.ts index 091ba340c..a9e3dc3fc 100644 --- a/src/RemoteFileAPI/MessageHandlers.ts +++ b/src/RemoteFileAPI/MessageHandlers.ts @@ -13,7 +13,7 @@ import { isFileData, } from "./MessageDefinitions"; -import libSource from "../ScriptEditor/NetscriptDefinitions.d.ts"; +import libSource from "!!raw-loader!../ScriptEditor/NetscriptDefinitions.d.ts"; function error(errorMsg: string, { id }: RFAMessage): RFAMessage { return new RFAMessage({ error: errorMsg, id: id }); diff --git a/test/__mocks__/rawLoader.js b/test/__mocks__/rawLoader.js new file mode 100644 index 000000000..e69de29bb