Skip to content

Commit 0daf667

Browse files
authored
Fix typed routes test expectations (#86487)
Follow up to #86273 The typed routes test was checking for `/project/[slug]` in the `RedirectRoutes` type, but this route doesn't actually exist in the test fixture anymore. The test fixture only has redirects defined for `/blog/[category]/[[...slug]]`. When Next.js generates the typed routes during the build, it only includes routes that actually exist in the project structure. The test was expecting a route that wasn't present, which would cause the test to fail if the generated types were correct. This removes `/project/[slug]` from the expected `RedirectRoutes` type so the test expectations match what's actually generated. Also includes a minor formatting fix in `apps/bundle-analyzer/next-env.d.ts` to use consistent semicolons and double quotes per the project's style guidelines.
1 parent 39440fc commit 0daf667

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/app-dir/typed-routes/typed-routes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type AppRoutes = "/" | "/_shop/[[...category]]" | "/dashboard" | "/dashboard/set
66
type AppRouteHandlerRoutes = "/api-test" | "/api/docs/[...slug]" | "/api/shop/[[...category]]" | "/api/users/[id]"
77
type PageRoutes = "/about" | "/users/[id]"
88
type LayoutRoutes = "/" | "/dashboard"
9-
type RedirectRoutes = "/blog/[category]/[[...slug]]" | "/project/[slug]"
9+
type RedirectRoutes = "/blog/[category]/[[...slug]]"
1010
type RewriteRoutes = "/api-legacy/[version]/[[...endpoint]]" | "/docs-old/[...path]"
1111
type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes
1212
`

0 commit comments

Comments
 (0)