Unverified Commit c5bdc5c5 authored by Willi#m ⬣'s avatar Willi#m ⬣ Committed by GitHub

add missing function call to `normalize-catchall-routes` test case (#60777)

### Fixed a Test Case

- Tests fixed:
`packages/next/src/build/normalize-catchall-routes.test.ts`, the
function call `normalizeCatchAllRoutes(appPaths)` was removed by
accident in this [merged commit
](https://github.com/vercel/next.js/commit/efebba80a7ca06b0fdcd619563f13945eb22508a#diff-e3c0d3c6e15d8b035a3252a1ada2b04d5dd33010885fed8f6d689f75aa80bff5)
rendering the test case pointless

REF NEXT-1984
parent 9e8e44e5
......@@ -11,8 +11,10 @@ describe('normalizeCatchallRoutes', () => {
const initialAppPaths = JSON.parse(JSON.stringify(appPaths))
// normalize appPaths against catchAlls
normalizeCatchAllRoutes(appPaths)
// ensure values are correct after normalizing
expect(appPaths).toMatchObject(initialAppPaths)
})
......@@ -36,8 +38,10 @@ describe('normalizeCatchallRoutes', () => {
],
}
// normalize appPaths against catchAlls
normalizeCatchAllRoutes(appPaths)
// ensure values are correct after normalizing
expect(appPaths).toMatchObject({
'/parallel-nested-catchall': ['/parallel-nested-catchall/page'],
'/parallel-nested-catchall/[...catchAll]': [
......@@ -73,8 +77,10 @@ describe('normalizeCatchallRoutes', () => {
'/foo/[...catchAll]': ['/@slot/foo/[...catchAll]/page'],
}
// normalize appPaths against catchAlls
normalizeCatchAllRoutes(appPaths)
// ensure values are correct after normalizing
expect(appPaths).toMatchObject({
'/': [
'/page',
......@@ -115,6 +121,10 @@ describe('normalizeCatchallRoutes', () => {
const initialAppPaths = JSON.parse(JSON.stringify(appPaths))
// normalize appPaths against catchAlls
normalizeCatchAllRoutes(appPaths)
// ensure values are correct after normalizing
expect(appPaths).toMatchObject(initialAppPaths)
})
......@@ -126,8 +136,11 @@ describe('normalizeCatchallRoutes', () => {
}
const initialAppPaths = JSON.parse(JSON.stringify(appPaths))
// normalize appPaths against catchAlls
normalizeCatchAllRoutes(appPaths)
// ensure values are correct after normalizing
expect(appPaths).toMatchObject(initialAppPaths)
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment