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
fa15e6f1
Unverified
Commit
fa15e6f1
authored
Oct 15, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Oct 28, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reenable tests
parent
566a8442
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
94 deletions
+49
-94
next.config.ts
test/production/segment-config-precedence/next.config.ts
+1
-5
segment-config-precedence.test.ts
...gment-config-precedence/segment-config-precedence.test.ts
+48
-89
No files found.
test/production/segment-config-precedence/next.config.ts
View file @
fa15e6f1
import
type
{
NextConfig
}
from
'next'
import
type
{
NextConfig
}
from
'next'
const
nextConfig
:
NextConfig
=
{
const
nextConfig
:
NextConfig
=
{}
// TODO: Type-check excluded layouts once --debug-build-paths generates their slot types.
// Webpack still type-checks the complete fixture.
typescript
:
{
ignoreBuildErrors
:
!!
process
.
env
.
IS_TURBOPACK_TEST
},
}
export
default
nextConfig
export
default
nextConfig
test/production/segment-config-precedence/segment-config-precedence.test.ts
View file @
fa15e6f1
...
@@ -4,28 +4,6 @@ import { retry } from 'next-test-utils'
...
@@ -4,28 +4,6 @@ import { retry } from 'next-test-utils'
describe
(
'segment-config-precedence'
,
()
=>
{
describe
(
'segment-config-precedence'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
const
{
next
}
=
nextTestSetup
({
files
:
__dirname
,
files
:
__dirname
,
// TODO: Include these routes once Turbopack accepts conflicting sibling
// deployment configs. Their individual tests are excluded below.
buildArgs
:
process
.
env
.
IS_TURBOPACK_TEST
?
[
'--debug-build-paths'
,
[
'app/**'
,
'pages/**'
,
...[
'slot-only'
,
'sibling-layout'
,
'default-config'
,
'(config-group)'
,
'complex-catchall'
,
'nested-slots'
,
'intercept'
,
'slot-edge-runtime'
,
'entry-config'
,
].
map
((
route
)
=>
`!app/
${
route
}
/**`
),
].
join
(
','
),
]
:
undefined
,
})
})
it
(
'accepts an undefined maxDuration export'
,
async
()
=>
{
it
(
'accepts an undefined maxDuration export'
,
async
()
=>
{
...
@@ -53,32 +31,27 @@ describe('segment-config-precedence', () => {
...
@@ -53,32 +31,27 @@ describe('segment-config-precedence', () => {
)
)
it
.
each
([
it
.
each
([
// TODO: Fix Turbopack rejecting conflicting sibling deployment configs.
{
...(
!
process
.
env
.
IS_TURBOPACK_TEST
pathname
:
'/slot-only/only'
,
?
[
request
:
'/slot-only/only'
,
{
appPath
:
'/slot-only/@slot/only/page'
,
pathname
:
'/slot-only/only'
,
runtime
:
'nodejs'
,
request
:
'/slot-only/only'
,
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
0
},
appPath
:
'/slot-only/@slot/only/page'
,
},
runtime
:
'nodejs'
,
{
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
0
},
pathname
:
'/sibling-layout'
,
},
request
:
'/sibling-layout'
,
{
appPath
:
'/sibling-layout/page'
,
pathname
:
'/sibling-layout'
,
runtime
:
'nodejs'
,
request
:
'/sibling-layout'
,
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
20
},
appPath
:
'/sibling-layout/page'
,
},
runtime
:
'nodejs'
,
{
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
20
},
pathname
:
'/default-config'
,
},
request
:
'/default-config'
,
{
appPath
:
'/default-config/page'
,
pathname
:
'/default-config'
,
runtime
:
'nodejs'
,
request
:
'/default-config'
,
config
:
{},
appPath
:
'/default-config/page'
,
},
runtime
:
'nodejs'
,
config
:
{},
},
]
:
[]),
{
{
pathname
:
'/inheritance/nested'
,
pathname
:
'/inheritance/nested'
,
request
:
'/inheritance/nested'
,
request
:
'/inheritance/nested'
,
...
@@ -93,32 +66,27 @@ describe('segment-config-precedence', () => {
...
@@ -93,32 +66,27 @@ describe('segment-config-precedence', () => {
runtime
:
'nodejs'
,
runtime
:
'nodejs'
,
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
0
},
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
0
},
},
},
// TODO: Fix Turbopack rejecting conflicting sibling deployment configs.
{
...(
!
process
.
env
.
IS_TURBOPACK_TEST
pathname
:
'/grouped/[id]'
,
?
[
request
:
'/grouped/value'
,
{
appPath
:
'/(config-group)/grouped/[id]/page'
,
pathname
:
'/grouped/[id]'
,
runtime
:
'edge'
,
request
:
'/grouped/value'
,
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
20
},
appPath
:
'/(config-group)/grouped/[id]/page'
,
},
runtime
:
'edge'
,
{
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
20
},
pathname
:
'/complex-catchall/[...slug]'
,
},
request
:
'/complex-catchall/one/two'
,
{
appPath
:
'/complex-catchall/[...slug]/page'
,
pathname
:
'/complex-catchall/[...slug]'
,
runtime
:
'nodejs'
,
request
:
'/complex-catchall/one/two'
,
config
:
{
regions
:
[
'fra1'
],
maxDuration
:
20
},
appPath
:
'/complex-catchall/[...slug]/page'
,
},
runtime
:
'nodejs'
,
{
config
:
{
regions
:
[
'fra1'
],
maxDuration
:
20
},
pathname
:
'/nested-slots'
,
},
request
:
'/nested-slots'
,
{
appPath
:
'/nested-slots/page'
,
pathname
:
'/nested-slots'
,
runtime
:
'nodejs'
,
request
:
'/nested-slots'
,
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
20
},
appPath
:
'/nested-slots/page'
,
},
runtime
:
'nodejs'
,
config
:
{
regions
:
[
'sfo1'
],
maxDuration
:
20
},
},
]
:
[]),
])(
])(
'resolves static info through complex loader trees: $pathname'
,
'resolves static info through complex loader trees: $pathname'
,
async
({
pathname
,
request
,
appPath
,
runtime
,
config
})
=>
{
async
({
pathname
,
request
,
appPath
,
runtime
,
config
})
=>
{
...
@@ -154,8 +122,6 @@ describe('segment-config-precedence', () => {
...
@@ -154,8 +122,6 @@ describe('segment-config-precedence', () => {
}
}
)
)
// TODO: Fix Turbopack rejecting conflicting intercepted entry configs at build time.
// @force-gate !turbopack
it
(
'keeps intercepted entry config separate from the direct target'
,
async
()
=>
{
it
(
'keeps intercepted entry config separate from the direct target'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/intercept/target'
)
const
$
=
await
next
.
render$
(
'/intercept/target'
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
'nodejs'
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
'nodejs'
)
...
@@ -309,8 +275,6 @@ describe('segment-config-precedence', () => {
...
@@ -309,8 +275,6 @@ describe('segment-config-precedence', () => {
expect
(
manifest
.
functions
[
'/slot-config-only'
]).
toBeUndefined
()
expect
(
manifest
.
functions
[
'/slot-config-only'
]).
toBeUndefined
()
})
})
// TODO: Fix Turbopack rejecting conflicting sibling runtime configs at build time.
// @force-gate !turbopack
it
(
'does not select the Edge runtime from a sibling parallel slot'
,
async
()
=>
{
it
(
'does not select the Edge runtime from a sibling parallel slot'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/slot-edge-runtime'
)
const
$
=
await
next
.
render$
(
'/slot-edge-runtime'
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
'nodejs'
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
'nodejs'
)
...
@@ -322,8 +286,6 @@ describe('segment-config-precedence', () => {
...
@@ -322,8 +286,6 @@ describe('segment-config-precedence', () => {
expect
(
manifest
.
functions
[
'/slot-edge-runtime/page'
]).
toBeUndefined
()
expect
(
manifest
.
functions
[
'/slot-edge-runtime/page'
]).
toBeUndefined
()
})
})
// TODO: Stop Turbopack inheriting Edge regions from sibling parallel slots.
// @gate !turbopack
it
(
'does not inherit Edge manifest regions from a sibling parallel slot'
,
async
()
=>
{
it
(
'does not inherit Edge manifest regions from a sibling parallel slot'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/slot-edge-region'
)
const
$
=
await
next
.
render$
(
'/slot-edge-region'
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
'edge'
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
'edge'
)
...
@@ -343,13 +305,12 @@ describe('segment-config-precedence', () => {
...
@@ -343,13 +305,12 @@ describe('segment-config-precedence', () => {
expect
(
functionsConfig
.
functions
[
'/slot-edge-region'
]).
toEqual
({})
expect
(
functionsConfig
.
functions
[
'/slot-edge-region'
]).
toEqual
({})
})
})
for
(
const
[
route
,
runtime
,
region
,
maxDuration
]
of
[
it
.
each
(
[
[
'/entry-config'
,
'nodejs'
,
'sfo1'
,
20
],
[
'/entry-config'
,
'nodejs'
,
'sfo1'
,
20
],
[
'/entry-config/inherited'
,
'edge'
,
'fra1'
,
30
],
[
'/entry-config/inherited'
,
'edge'
,
'fra1'
,
30
],
]
as
const
)
{
])(
// TODO: Fix Turbopack rejecting conflicting entry and parallel slot configs.
'uses the entry page and ancestor layouts for static info: %s'
,
// @force-gate !turbopack
async
(
route
,
runtime
,
region
,
maxDuration
)
=>
{
it
(
`uses the entry page and ancestor layouts for static info:
${
route
}
`
,
async
()
=>
{
const
$
=
await
next
.
render$
(
route
)
const
$
=
await
next
.
render$
(
route
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
runtime
)
expect
(
$
(
'#runtime'
).
text
()).
toBe
(
runtime
)
expect
(
$
(
'#slot'
).
text
()).
toBe
(
'slot'
)
expect
(
$
(
'#slot'
).
text
()).
toBe
(
'slot'
)
...
@@ -372,8 +333,8 @@ describe('segment-config-precedence', () => {
...
@@ -372,8 +333,8 @@ describe('segment-config-precedence', () => {
}
else
{
}
else
{
expect
(
manifest
.
functions
[
`
${
route
}
/page`
]).
toBeUndefined
()
expect
(
manifest
.
functions
[
`
${
route
}
/page`
]).
toBeUndefined
()
}
}
}
)
}
}
)
it
.
each
([
it
.
each
([
[
'export-first'
,
'nodejs'
],
[
'export-first'
,
'nodejs'
],
...
@@ -441,8 +402,6 @@ describe('synthetic not-found config: ignored edge exports', () => {
...
@@ -441,8 +402,6 @@ describe('synthetic not-found config: ignored edge exports', () => {
files
:
`
${
__dirname
}
/fixtures/not-found`
,
files
:
`
${
__dirname
}
/fixtures/not-found`
,
})
})
// TODO: Align Turbopack's synthetic not-found runtime with root layout inheritance.
// @gate !turbopack
it
(
'inherits the root layout runtime instead of the not-found exports'
,
async
()
=>
{
it
(
'inherits the root layout runtime instead of the not-found exports'
,
async
()
=>
{
const
response
=
await
next
.
fetch
(
'/missing'
)
const
response
=
await
next
.
fetch
(
'/missing'
)
expect
(
response
.
status
).
toBe
(
404
)
expect
(
response
.
status
).
toBe
(
404
)
...
...
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