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
d1257866
Unverified
Commit
d1257866
authored
Oct 31, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Oct 31, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] Deflake nested `after()` tests (#85566)
parent
d349bd08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
index.test.ts
test/e2e/app-dir/next-after-app-api-usage/index.test.ts
+22
-16
No files found.
test/e2e/app-dir/next-after-app-api-usage/index.test.ts
View file @
d1257866
...
...
@@ -58,24 +58,27 @@ describe('nextjs APIs in after()', () => {
`[
${
path
}
] headers(): error: Error: Route
${
path
}
used \`headers()\` inside \`after()\`. This is not supported.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
nested header
s(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
cookie
s(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
]
nested headers(): error: Error: Route
${
path
}
used \`header
s()\` inside \`after()\`. This is not supported.`
`[
${
path
}
]
cookies(): error: Error: Route
${
path
}
used \`cookie
s()\` inside \`after()\`. This is not supported.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] co
okies
(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] co
nnection
(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
] co
okies(): error: Error: Route
${
path
}
used \`cookies()\` inside \`after()\`. This is not supported
.`
`[
${
path
}
] co
nnection(): error: Error: Route
${
path
}
used \`connection()\` inside \`after()\`
.`
)
})
await
retry
(()
=>
{
const
logs
=
getLogs
()
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] nested
cookie
s(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] nested
header
s(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
] nested
cookies(): error: Error: Route
${
path
}
used \`cookie
s()\` inside \`after()\`. This is not supported.`
`[
${
path
}
] nested
headers(): error: Error: Route
${
path
}
used \`header
s()\` inside \`after()\`. This is not supported.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
connection
(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
nested cookies
(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
]
connection(): error: Error: Route
${
path
}
used \`connection()\` inside \`after()\`
.`
`[
${
path
}
]
nested cookies(): error: Error: Route
${
path
}
used \`cookies()\` inside \`after()\`. This is not supported
.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] nested connection(): ok`
)
...
...
@@ -105,24 +108,27 @@ describe('nextjs APIs in after()', () => {
`[
${
path
}
] headers(): error: Error: Route
${
path
}
used \`headers()\` inside \`after()\`. This is not supported.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
nested header
s(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
cookie
s(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
]
nested headers(): error: Error: Route
${
path
}
used \`header
s()\` inside \`after()\`. This is not supported.`
`[
${
path
}
]
cookies(): error: Error: Route
${
path
}
used \`cookie
s()\` inside \`after()\`. This is not supported.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] co
okies
(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] co
nnection
(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
] co
okies(): error: Error: Route
${
path
}
used \`cookies()\` inside \`after()\`. This is not supported
.`
`[
${
path
}
] co
nnection(): error: Error: Route
${
path
}
used \`connection()\` inside \`after()\`
.`
)
})
await
retry
(()
=>
{
const
logs
=
isNextDev
?
getLogs
()
:
buildLogs
// in `next start` the error was logged at build time
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] nested
cookie
s(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] nested
header
s(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
] nested
cookies(): error: Error: Route
${
path
}
used \`cookie
s()\` inside \`after()\`. This is not supported.`
`[
${
path
}
] nested
headers(): error: Error: Route
${
path
}
used \`header
s()\` inside \`after()\`. This is not supported.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
connection
(): ok`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
]
nested cookies
(): ok`
)
expect
(
logs
).
toContain
(
`[
${
path
}
]
connection(): error: Error: Route
${
path
}
used \`connection()\` inside \`after()\`
.`
`[
${
path
}
]
nested cookies(): error: Error: Route
${
path
}
used \`cookies()\` inside \`after()\`. This is not supported
.`
)
expect
(
logs
).
not
.
toContain
(
`[
${
path
}
] nested connection(): ok`
)
...
...
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