Fix failing tests
This commit is contained in:
@@ -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"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user