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
9f19d267
Unverified
Commit
9f19d267
authored
Feb 24, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Feb 24, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] Deflake `typed-routes-validator` using `tsc` (#90451)
Co-authored-by:
Cursor Agent
<
cursoragent@cursor.com
>
parent
aaabdcd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
typed-routes-validator.test.ts
...dir/typed-routes-validator/typed-routes-validator.test.ts
+16
-1
No files found.
test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts
View file @
9f19d267
import
execa
from
'execa'
import
{
nextTestSetup
}
from
'e2e-utils'
import
{
getDistDir
}
from
'next-test-utils'
import
{
getDistDir
,
retry
}
from
'next-test-utils'
const
strictRouteTypes
=
process
.
env
.
__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES
===
'true'
...
...
@@ -42,6 +42,21 @@ describe('typed-routes-validator', () => {
await
next
.
build
()
}
try
{
if
(
isNextDev
)
{
// In dev mode, next-env.d.ts and the route type definitions it
// references (.next/types/routes.d.ts) are generated asynchronously
// after the server starts. Wait for both files to be ready with
// actual route data before running tsc.
await
retry
(
async
()
=>
{
const
envDts
=
await
next
.
readFile
(
'next-env.d.ts'
)
expect
(
envDts
).
toContain
(
'reference types="next"'
)
const
routesDts
=
await
next
.
readFile
(
`
${
getDistDir
()}
/types/routes.d.ts`
)
expect
(
routesDts
).
toContain
(
'AppRoutes = "/"'
)
})
}
const
{
stdout
,
stderr
}
=
await
execa
(
'pnpm'
,
[
'tsc'
,
'--noEmit'
],
{
cwd
:
next
.
testDir
,
reject
:
false
,
...
...
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