Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
beff2f40
Commit
beff2f40
authored
Apr 03, 2026
by
Josh Story
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
fb3ebba6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
0 deletions
+62
-0
page.tsx
...h-optional-catchall/@breadcrumbs/[[...catchall]]/page.tsx
+13
-0
_page.tsx
.../no-build-error/app/slot-with-optional-catchall/_page.tsx
+11
-0
layout.tsx
...no-build-error/app/slot-with-optional-catchall/layout.tsx
+14
-0
page.tsx
...ild-error/app/slot-with-optional-catchall/nested/page.tsx
+8
-0
parallel-routes-leaf-segments.no-build-error.test.ts
...ents/parallel-routes-leaf-segments.no-build-error.test.ts
+16
-0
No files found.
test/e2e/app-dir/parallel-routes-leaf-segments/fixtures/no-build-error/app/slot-with-optional-catchall/@breadcrumbs/[[...catchall]]/page.tsx
0 → 100644
View file @
beff2f40
export
default
async
function
Page
({
params
,
}:
{
params
:
Promise
<
{
catchall
?:
string
[]
}
>
})
{
const
{
catchall
}
=
await
params
return
(
<
nav
className=
"breadcrumbs-content"
>
<
h3
>
Breadcrumbs
</
h3
>
<
p
>
Path: /
{
catchall
?
catchall
.
join
(
'/'
)
:
''
}
</
p
>
</
nav
>
)
}
test/e2e/app-dir/parallel-routes-leaf-segments/fixtures/no-build-error/app/slot-with-optional-catchall/_page.tsx
0 → 100644
View file @
beff2f40
export
default
function
Page
()
{
return
(
<
div
>
<
h2
>
Slot With Optional Catchall Page
</
h2
>
<
p
>
The @breadcrumbs slot uses [[...catchall]] which matches all routes
including the root. No default.tsx should be required.
</
p
>
</
div
>
)
}
test/e2e/app-dir/parallel-routes-leaf-segments/fixtures/no-build-error/app/slot-with-optional-catchall/layout.tsx
0 → 100644
View file @
beff2f40
export
default
function
Layout
({
children
,
breadcrumbs
,
}:
{
children
:
React
.
ReactNode
breadcrumbs
:
React
.
ReactNode
})
{
return
(
<
div
className=
"optional-catchall-container"
>
<
div
className=
"breadcrumbs"
>
{
breadcrumbs
}
</
div
>
<
div
className=
"main"
>
{
children
}
</
div
>
</
div
>
)
}
test/e2e/app-dir/parallel-routes-leaf-segments/fixtures/no-build-error/app/slot-with-optional-catchall/nested/page.tsx
0 → 100644
View file @
beff2f40
export
default
function
Page
()
{
return
(
<
div
>
<
h2
>
Nested Page
</
h2
>
<
p
>
A child route to ensure this is not a leaf segment.
</
p
>
</
div
>
)
}
test/e2e/app-dir/parallel-routes-leaf-segments/parallel-routes-leaf-segments.no-build-error.test.ts
View file @
beff2f40
...
@@ -67,6 +67,22 @@ describe('parallel-routes-leaf-segments-no-build-error', () => {
...
@@ -67,6 +67,22 @@ describe('parallel-routes-leaf-segments-no-build-error', () => {
})
})
})
})
describe
(
'parallel slot with optional catchall'
,
()
=>
{
it
(
'should not require default.tsx when slot contains [[...catchall]]'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/slot-with-optional-catchall'
)
expect
(
$
(
'h2'
).
text
()).
toBe
(
'Slot With Optional Catchall Page'
)
expect
(
$
(
'.breadcrumbs-content h3'
).
text
()).
toBe
(
'Breadcrumbs'
)
})
it
(
'should render the optional catchall slot for nested routes'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/slot-with-optional-catchall/nested'
)
expect
(
$
(
'h2'
).
text
()).
toBe
(
'Nested Page'
)
expect
(
$
(
'.breadcrumbs-content h3'
).
text
()).
toBe
(
'Breadcrumbs'
)
})
})
describe
(
'no children slot'
,
()
=>
{
describe
(
'no children slot'
,
()
=>
{
it
(
'should render the no children slot'
,
async
()
=>
{
it
(
'should render the no children slot'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/no-children/other'
)
const
$
=
await
next
.
render$
(
'/no-children/other'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment