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
27729798
Unverified
Commit
27729798
authored
Feb 18, 2025
by
Hendrik Liebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run dev tests in sandboxes
parent
1f4f84e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
use-cache-unknown-cache-kind.test.ts
...e-unknown-cache-kind/use-cache-unknown-cache-kind.test.ts
+17
-13
No files found.
test/e2e/app-dir/use-cache-unknown-cache-kind/use-cache-unknown-cache-kind.test.ts
View file @
27729798
...
...
@@ -8,6 +8,7 @@ import {
retry
,
}
from
'next-test-utils'
import
stripAnsi
from
'strip-ansi'
import
{
createSandbox
}
from
'development-sandbox'
const
nextConfigWithCacheHandler
:
NextConfig
=
{
experimental
:
{
...
...
@@ -88,12 +89,14 @@ describe('use-cache-unknown-cache-kind', () => {
})
}
else
{
it
(
'should not show an error for default cache kinds'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/remote'
)
await
using
sandbox
=
await
createSandbox
(
next
,
undefined
,
'/remote'
)
const
{
browser
}
=
sandbox
await
assertNoRedbox
(
browser
)
})
it
(
'should show a build error'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/'
)
await
using
sandbox
=
await
createSandbox
(
next
,
undefined
,
'/'
)
const
{
browser
}
=
sandbox
await
assertHasRedbox
(
browser
)
...
...
@@ -161,23 +164,24 @@ describe('use-cache-unknown-cache-kind', () => {
})
it
(
'should recover from the build error if the cache handler is defined'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/'
)
await
using
sandbox
=
await
createSandbox
(
next
,
undefined
,
'/'
)
const
{
browser
,
session
}
=
sandbox
await
assertHasRedbox
(
browser
)
await
next
.
patchFile
(
await
session
.
patch
(
'next.config.js'
,
`module.exports =
${
JSON
.
stringify
(
nextConfigWithCacheHandler
)}
`
,
()
=>
retry
(
async
()
=>
{
console
.
count
(
'retry check for hello world'
)
const
text
=
await
browser
.
elementByCss
(
'p'
).
text
()
console
.
log
(
'text is'
,
JSON
.
stringify
(
text
))
expect
(
text
).
toBe
(
'hello world'
)
await
assertNoRedbox
(
browser
)
})
`module.exports =
${
JSON
.
stringify
(
nextConfigWithCacheHandler
)}
`
)
await
retry
(
async
()
=>
{
console
.
count
(
'retry check for hello world'
)
const
text
=
await
browser
.
elementByCss
(
'p'
).
text
()
console
.
log
(
'text is'
,
JSON
.
stringify
(
text
))
expect
(
text
).
toBe
(
'hello world'
)
await
assertNoRedbox
(
browser
)
})
console
.
log
(
'test end'
)
})
}
...
...
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