diff options
| -rw-r--r-- | webAO/__tests__/aoml.test.ts (renamed from webAO/utils/__tests__/aoml.test.ts) | 6 | ||||
| -rw-r--r-- | webAO/__tests__/downloadFile.test.ts (renamed from webAO/services/__tests__/downloadFile.test.ts) | 2 | ||||
| -rw-r--r-- | webAO/__tests__/tryUrls.test.ts (renamed from webAO/utils/__tests__/tryUrls.test.ts) | 8 | ||||
| -rw-r--r-- | webAO/utils/__tests__/paths.test.ts | 11 |
4 files changed, 8 insertions, 19 deletions
diff --git a/webAO/utils/__tests__/aoml.test.ts b/webAO/__tests__/aoml.test.ts index b5cd9b1..b799da6 100644 --- a/webAO/utils/__tests__/aoml.test.ts +++ b/webAO/__tests__/aoml.test.ts @@ -1,7 +1,7 @@ -import request from "../../services/request"; -import mlConfig from "../aoml"; +import request from "../services/request"; +import mlConfig from "../utils/aoml"; -jest.mock("../../services/request"); +jest.mock("../services/request"); const networkRequest = ` c0 = 247, 247, 247 c0_name = White diff --git a/webAO/services/__tests__/downloadFile.test.ts b/webAO/__tests__/downloadFile.test.ts index c37c735..738d6f3 100644 --- a/webAO/services/__tests__/downloadFile.test.ts +++ b/webAO/__tests__/downloadFile.test.ts @@ -1,4 +1,4 @@ -import downloadFile from "../downloadFile"; +import downloadFile from "../services/downloadFile"; jest.useFakeTimers().setSystemTime(new Date("2020-01-01").getTime()); global.URL.createObjectURL = jest.fn(); diff --git a/webAO/utils/__tests__/tryUrls.test.ts b/webAO/__tests__/tryUrls.test.ts index f85392c..4a32f32 100644 --- a/webAO/utils/__tests__/tryUrls.test.ts +++ b/webAO/__tests__/tryUrls.test.ts @@ -1,7 +1,7 @@ -import fileExists from "../fileExists"; -import tryUrls from "../tryUrls"; -import transparentPng from "../../constants/transparentPng"; -jest.mock("../fileExists"); +import fileExists from "../utils/fileExists"; +import tryUrls from "../utils/tryUrls"; +import transparentPng from "../constants/transparentPng"; +jest.mock("../utils/fileExists"); const mockFileExists = fileExists as jest.MockedFunction<typeof fileExists>; diff --git a/webAO/utils/__tests__/paths.test.ts b/webAO/utils/__tests__/paths.test.ts deleted file mode 100644 index fe7b1bf..0000000 --- a/webAO/utils/__tests__/paths.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { getFilenameFromPath } from "../paths"; -jest.mock("../fileExists"); - -describe("getFilenameFromPath", () => { - const EXAMPLE_PATH = "localhost/stoneddiscord/assets.png"; - it("Should get the last value from a path", async () => { - const actual = getFilenameFromPath(EXAMPLE_PATH); - const expected = "assets.png"; - expect(actual).toBe(expected); - }); -}); |
