Fix failing tests

This commit is contained in:
2026-10-03 03:18:03 +01:00
parent 3a4ece5255
commit 6e6cfef5e5
12 changed files with 182 additions and 138 deletions
@@ -24,15 +24,15 @@ import { log } from "../../../../src/utils/log";
import grabPageComponent from "../../../../src/functions/server/web-pages/grab-page-component";
describe("grabPageComponent", () => {
const originalRouter = global.ROUTER;
const originalRouter = global.BUNEXT_ROUTER;
afterEach(() => {
global.ROUTER = originalRouter;
global.BUNEXT_ROUTER = originalRouter;
mock.restore();
});
test("does not log an error for expected 404 page lookups", async () => {
global.ROUTER = new Bun.FileSystemRouter({
global.BUNEXT_ROUTER = new Bun.FileSystemRouter({
style: "nextjs",
dir: path.resolve(__dirname, "../../../../test/e2e-fixture/src/pages"),
});