test(frontend): simplify fetch mock signatures in auth tests
CI / test (push) Failing after 2m49s
CI / docker (push) Skipped

This commit is contained in:
zwitschi committed 2026-08-13 13:24:56 +02:00
1 parent 02ff53229c
commit 568112b85a
1 file changed
+2 -4
+2 -4
View File
@@ -440,7 +440,7 @@ describe("auth and user list wiring", () => {
it("logs in and updates the auth UI", async () => {
await import("../src/main");
globalThis.fetch = vi.fn(async (url: any, opts?: any) => {
globalThis.fetch = vi.fn(async (url: any) => {
const u = String(url);
if (u.includes("/api/auth/login")) {
return {
@@ -470,9 +470,7 @@ describe("auth and user list wiring", () => {
it("toggles the user list visibility", async () => {
await import("../src/main");
globalThis.fetch = vi
.fn()
.mockResolvedValue({
globalThis.fetch = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ authenticated: false, entries: [] }),
text: async () => "",