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
e6ab62b9
Unverified
Commit
e6ab62b9
authored
Sep 07, 2026
by
Hendrik Liebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] Use `@force-gate`
parent
55638d47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
47 deletions
+42
-47
variants-invalid-combinations.test.ts
...2e/app-dir/variants/variants-invalid-combinations.test.ts
+42
-47
No files found.
test/e2e/app-dir/variants/variants-invalid-combinations.test.ts
View file @
e6ab62b9
...
@@ -53,58 +53,53 @@ const cases: ReadonlyArray<readonly [string, string]> = [
...
@@ -53,58 +53,53 @@ const cases: ReadonlyArray<readonly [string, string]> = [
// Variants are supported with Turbopack only, so a webpack build rejects the
// Variants are supported with Turbopack only, so a webpack build rejects the
// config of this fixture before it reads any route.
// config of this fixture before it reads any route.
;(
process
.
env
.
IS_TURBOPACK_TEST
?
describe
:
describe
.
skip
)(
// @force-gate turbopack
'static variant combinations that are rejected'
,
describe
(
'static variant combinations that are rejected'
,
()
=>
{
()
=>
{
const
{
next
,
skipped
}
=
nextTestSetup
({
const
{
next
,
skipped
}
=
nextTestSetup
({
files
:
__dirname
+
'/fixtures/invalid-combinations'
,
files
:
__dirname
+
'/fixtures/invalid-combinations'
,
// Every route of this fixture declares combinations that are rejected, so
// Every route of this fixture declares combinations that are rejected, so
// a build of all of them at once cannot succeed. Both modes below drive
// a build of all of them at once cannot succeed. Both modes below drive
// Next.js by hand instead.
// Next.js by hand instead.
skipStart
:
true
,
skipStart
:
true
,
skipDeployment
:
true
,
skipDeployment
:
true
,
})
})
if
(
skipped
)
{
if
(
skipped
)
{
return
return
}
}
if
(
isNextDev
)
{
if
(
isNextDev
)
{
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
await
next
.
start
()
await
next
.
start
()
})
})
it
.
each
(
cases
)(
'should report %s'
,
async
(
name
,
expected
)
=>
{
it
.
each
(
cases
)(
'should report %s'
,
async
(
name
,
expected
)
=>
{
const
response
=
await
next
.
fetch
(
`/case/
${
name
}
/requested`
)
const
response
=
await
next
.
fetch
(
`/case/
${
name
}
/requested`
)
expect
(
response
.
status
).
toBe
(
500
)
expect
(
response
.
status
).
toBe
(
500
)
await
retry
(
async
()
=>
{
await
retry
(
async
()
=>
{
expect
(
next
.
cliOutput
).
toContain
(
expected
)
expect
(
next
.
cliOutput
).
toContain
(
expected
)
})
})
})
}
else
{
})
it
(
'should reject a combination on a route with no dynamic segments'
,
async
()
=>
{
}
else
{
// The dev server reads the static variant combinations of a route when
it
(
'should reject a combination on a route with no dynamic segments'
,
async
()
=>
{
// it builds the static paths of that route, and it builds them for a
// The dev server reads the static variant combinations of a route when
// dynamic route on request. This route has no dynamic segments, so it
// it builds the static paths of that route, and it builds them for a
// builds no static paths at all, and only a build reads what it
// dynamic route on request. This route has no dynamic segments, so it
// declared.
// builds no static paths at all, and only a build reads what it
//
// declared.
// `--debug-build-paths` restricts the build to this one route, so no
//
// other route of the fixture can fail first.
// `--debug-build-paths` restricts the build to this one route, so no
const
{
exitCode
,
cliOutput
}
=
await
next
.
build
({
// other route of the fixture can fail first.
args
:
[
const
{
exitCode
,
cliOutput
}
=
await
next
.
build
({
'--debug-build-paths'
,
args
:
[
'--debug-build-paths'
,
'app/case/no-dynamic-segments/page.tsx'
],
'app/case/no-dynamic-segments/page.tsx'
,
],
})
expect
(
exitCode
).
toBe
(
1
)
expect
(
cliOutput
).
toContain
(
'`unstable_generateStaticVariants` for /case/no-dynamic-segments did not return an array.'
)
})
})
}
expect
(
exitCode
).
toBe
(
1
)
expect
(
cliOutput
).
toContain
(
'`unstable_generateStaticVariants` for /case/no-dynamic-segments did not return an array.'
)
})
}
}
)
}
)
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