Files
calendar/apps/web/test/lib/pagesAndRewritePaths.test.ts
T
62b753afba chore: app router 404 page (#18597)
* wip

* wip

* fix not found page

* render middleware for /settings pages

* fix

* remove global-error page

* add metadata to not-found page

* make not-found page static

* remove 404

* adding not-found to middleware is not necessary

* add every routes to config.matcher

* fix test

* fix style

* use i18n string

* fix tests

* fix

* fix

* revert unneeded changes

* fix

* fix

* fix

* fix style

* fix

* remove 404

* remove log

* fix

* fix

* fix

* fix

* better naming

* parallel testing

---------

Co-authored-by: Benny Joo <sldisek783@gmail.com>
2025-01-11 02:42:08 +00:00

45 lines
936 B
TypeScript

import { it, expect, describe } from "vitest";
import { pages } from "../../pagesAndRewritePaths.js";
describe("pagesAndRewritePaths", () => {
describe("beforeFiles must exclude routes in pages/app router", () => {
const BEFORE_REWRITE_EXCLUDE_PAGES = [
"apps",
"availability",
"booking",
"connect-and-join",
"enterprise",
"error",
"getting-started",
"insights",
"maintenance",
"more",
"not-found",
"reschedule",
"settings",
"teams",
"upgrade",
"video",
"workflows",
"403",
"500",
"bookings",
"event-types",
"icons",
"org",
"payment",
"routing-forms",
"signup",
"team",
"d",
];
it("should include all required routes", () => {
BEFORE_REWRITE_EXCLUDE_PAGES.forEach((route) => {
expect(pages).toContain(route);
});
});
});
});