aboutsummaryrefslogtreecommitdiff
path: root/webAO/__tests__
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2025-09-03 12:20:42 +0200
committerstonedDiscord <Tukz@gmx.de>2025-09-03 12:20:42 +0200
commit183fd0fdddbcf194eec08f8e79e6a1709e18d3a9 (patch)
tree733426bb0261d3d0593b7739166ea9ab578564b9 /webAO/__tests__
parentd8d2fbc8b7bf91dbedc7042daa1081ebd0d1330f (diff)
also do bgs
Diffstat (limited to 'webAO/__tests__')
-rw-r--r--webAO/__tests__/tryBackgroundUrls.test.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/webAO/__tests__/tryBackgroundUrls.test.ts b/webAO/__tests__/tryBackgroundUrls.test.ts
deleted file mode 100644
index cfbf3f9..0000000
--- a/webAO/__tests__/tryBackgroundUrls.test.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import fileExists from "../utils/fileExists";
-import tryBackgroundUrls from "../utils/tryBackgroundUrls";
-import transparentPng from "../constants/transparentPng";
-jest.mock("../utils/fileExists");
-
-const mockFileExists = fileExists as jest.MockedFunction<typeof fileExists>;
-
-describe("tryBackgroundUrls", () => {
- it("Should try multiple file extensions", async () => {
- const url = "localhost/stoneddiscord/assets";
- mockFileExists
- .mockReturnValueOnce(Promise.resolve(false))
- .mockReturnValueOnce(Promise.resolve(false))
- .mockReturnValueOnce(Promise.resolve(false))
- .mockReturnValueOnce(Promise.resolve(true));
- const actual = await tryBackgroundUrls(url);
- const expected = "localhost/stoneddiscord/assets.apng";
- expect(actual).toBe(expected);
- });
-
- it("Should return a transparent png if it cant find any assets", async () => {
- const url = "localhost/stoneddiscord/assets";
- mockFileExists.mockReturnValue(Promise.resolve(false));
- const actual = await tryBackgroundUrls(url);
- const expected = transparentPng;
- expect(actual).toBe(expected);
- });
-});