rsnext/test
Zack Tanner 31a0edbd1b
parallel routes: fix catch-all slots being treated as optional catch-all (#61174)
### What
Catch-all parallel slots were being incorrectly matched to the root of their segment. For example, `@foo/[...catchAll]/page` as a parallel route on `/page.tsx` should not match on `/`, but it should match on `/foo`, `/bar`, ...etc

### Why
The catch-all route normalization logic doesn't treat optional catch-all routes differently from catch-all routes. The assumption was if any catch-all route was found, that it should match the path that shared its prefix.

### How
This updates the normalization logic to handle optional-catchall as it was in the original implementation. For regular catch-all, we ensure that the catch-all base path (for `/[...slug]` that'd be `/`) isn't identical to the path we'd match it to.

Fixes #60613
Closes NEXT-2243
2024-01-30 15:28:47 -08:00
..
.stats-app chore: upgrade pnpm to 8.14.2 (#60995) 2024-01-22 14:12:09 -08:00
development Same as #61360 (#61369) 2024-01-30 15:13:06 +01:00
e2e parallel routes: fix catch-all slots being treated as optional catch-all (#61174) 2024-01-30 15:28:47 -08:00
examples feat(cli): introduce --tailwind flag (#46927) 2023-03-16 16:06:27 +01:00
integration Fix image matcher in test (#61349) 2024-01-30 09:39:44 +01:00
lib Enable next.js version checker in turbopack (#61034) 2024-01-24 06:37:18 +01:00
production chore: Update terser to v5.27.0 (#61068) 2024-01-24 08:42:08 +01:00
unit feat: stabilize unstable_getImgProps() => getImageProps() (#60739) 2024-01-17 18:28:49 -05:00
.gitignore ci(workflow): enable test trace upload (#51107) 2023-06-12 17:14:13 +00:00
build-turbopack-tests-manifest.d.ts Update Turbopack test manifest from GitHub Actions artifact (#58394) 2023-11-24 16:48:12 +01:00
build-turbopack-tests-manifest.js chore: skip flaky turbopack navigation test (#60431) 2024-01-09 14:25:08 +00:00
get-test-filter.js run tests from test suite that are not listed in the manifest (#58401) 2024-01-11 07:38:35 +00:00
jest-setup-after-env.ts Decrease default test timeouts (#56116) 2023-09-27 23:55:20 +00:00
ppr-tests-manifest.json ppr: ensure the router state tree is provided for interception routes (#61059) 2024-01-24 10:20:47 -08:00
readme.md
test-file.txt
tsconfig.json chore: extends from shared base tsconfig (#59776) 2023-12-19 18:52:22 +01:00
turbopack-tests-manifest.json Same as #61360 (#61369) 2024-01-30 15:13:06 +01:00

See Testing for more information on how you can run/write/debug tests for Next.js.