From a044cecdfc0628a87b9a1d8fba2e7f3e5d0e5580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krzeslak?= Date: Sun, 25 Oct 2026 17:40:01 +0100 Subject: [PATCH] feat: fix mock leaking in CI causing tests to fail --- tests/eden/app.test.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/eden/app.test.ts b/tests/eden/app.test.ts index 2e2b4663..99540cc2 100644 --- a/tests/eden/app.test.ts +++ b/tests/eden/app.test.ts @@ -1,17 +1,12 @@ -import { describe, expect, mock, test } from "bun:test"; +import { describe, expect, test } from "bun:test"; import { app } from "../../src/eden"; -import * as realEnvModule from "../../src/helpers/env"; - -// The root endpoint requires auth by default (redirects to /login → 302). -// Enable unauthenticated mode so the root page renders without a session. -mock.module("../../src/helpers/env", () => ({ ...realEnvModule, ALLOW_UNAUTHENTICATED: true })); describe("eden app composition", () => { test("has all route endpoints mounted", async () => { - // GET / — home page (root) + // GET / — home page (root) may redirect (auth) or render (first run). const root = await app.handle(new Request("http://localhost/")); - expect(root.status).toBe(200); + expect(root.status).toBeLessThan(400); // POST /conversions — chooseConverter (public endpoint, lists converters) const conversions = await app.handle(