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
bd2c871e
Unverified
Commit
bd2c871e
authored
Nov 25, 2025
by
Niklas Mischkulnig
Committed by
GitHub
Nov 25, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip filesystem-cache.test.ts test with Webpack (#86506)
It's very flakey with Webpack
parent
6bfd8184
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
142 additions
and
123 deletions
+142
-123
filesystem-cache.test.ts
test/e2e/filesystem-cache/filesystem-cache.test.ts
+142
-123
No files found.
test/e2e/filesystem-cache/filesystem-cache.test.ts
View file @
bd2c871e
/* eslint-disable jest/no-standalone-expect */
import
{
nextTestSetup
,
isNextDev
}
from
'e2e-utils'
import
{
nextTestSetup
,
isNextDev
}
from
'e2e-utils'
import
{
waitFor
}
from
'next-test-utils'
import
{
waitFor
}
from
'next-test-utils'
process
.
env
.
NEXT_PUBLIC_ENV_VAR
=
'hello world'
// Make it easier to run in development, test directories are cleared between runs already so this is safe.
process
.
env
.
TURBO_ENGINE_IGNORE_DIRTY
=
'1'
// decrease the idle timeout to make the test more reliable
process
.
env
.
TURBO_ENGINE_SNAPSHOT_IDLE_TIMEOUT_MILLIS
=
'1000'
for
(
const
cacheEnabled
of
[
false
,
true
])
{
for
(
const
cacheEnabled
of
[
false
,
true
])
{
describe
(
`filesystem-caching with cache
${
cacheEnabled
?
'enabled'
:
'disabled'
}
`
,
()
=>
{
describe
(
`filesystem-caching with cache
${
cacheEnabled
?
'enabled'
:
'disabled'
}
`
,
()
=>
{
beforeAll
(()
=>
{
process
.
env
.
NEXT_PUBLIC_ENV_VAR
=
'hello world'
})
afterAll
(()
=>
{
delete
process
.
env
.
NEXT_PUBLIC_ENV_VAR
})
let
envVars
=
[
`ENABLE_CACHING=
${
cacheEnabled
?
'1'
:
''
}
`
,
// Make it easier to run in development, test directories are cleared between runs already so this is safe.
`TURBO_ENGINE_IGNORE_DIRTY=1`
,
// decrease the idle timeout to make the test more reliable
`TURBO_ENGINE_SNAPSHOT_IDLE_TIMEOUT_MILLIS=1000`
,
].
join
(
' '
)
const
{
skipped
,
next
,
isTurbopack
}
=
nextTestSetup
({
const
{
skipped
,
next
,
isTurbopack
}
=
nextTestSetup
({
files
:
__dirname
,
files
:
__dirname
,
skipDeployment
:
true
,
skipDeployment
:
true
,
packageJson
:
{
packageJson
:
{
scripts
:
{
scripts
:
{
build
:
`
ENABLE_CACHING=
${
cacheEnabled
?
'1'
:
''
}
next build`
,
build
:
`
${
envVars
}
next build`
,
dev
:
`
ENABLE_CACHING=
${
cacheEnabled
?
'1'
:
''
}
next dev`
,
dev
:
`
${
envVars
}
next dev`
,
start
:
'next start'
,
start
:
'next start'
,
},
},
},
},
...
@@ -56,7 +66,10 @@ for (const cacheEnabled of [false, true]) {
...
@@ -56,7 +66,10 @@ for (const cacheEnabled of [false, true]) {
await
next
.
start
()
await
next
.
start
()
}
}
it
(
'should cache or not cache loaders'
,
async
()
=>
{
// Very flakey with Webpack enabled
;(
process
.
env
.
IS_TURBOPACK_TEST
?
it
:
it
.
skip
)(
'should cache or not cache loaders'
,
async
()
=>
{
let
appTimestamp
,
unchangedTimestamp
,
appClientTimestamp
,
pagesTimestamp
let
appTimestamp
,
unchangedTimestamp
,
appClientTimestamp
,
pagesTimestamp
{
{
const
browser
=
await
next
.
browser
(
'/'
)
const
browser
=
await
next
.
browser
(
'/'
)
...
@@ -128,7 +141,8 @@ for (const cacheEnabled of [false, true]) {
...
@@ -128,7 +141,8 @@ for (const cacheEnabled of [false, true]) {
}
}
await
browser
.
close
()
await
browser
.
close
()
}
}
})
}
)
function
makeTextCheck
(
url
:
string
,
text
:
string
)
{
function
makeTextCheck
(
url
:
string
,
text
:
string
)
{
return
textCheck
.
bind
(
null
,
url
,
text
)
return
textCheck
.
bind
(
null
,
url
,
text
)
...
@@ -246,7 +260,10 @@ for (const cacheEnabled of [false, true]) {
...
@@ -246,7 +260,10 @@ for (const cacheEnabled of [false, true]) {
])
])
for
(
const
[
name
,
changes
]
of
combinations
)
{
for
(
const
[
name
,
changes
]
of
combinations
)
{
it
(
`should allow to change files while stopped (
${
name
}
)`
,
async
()
=>
{
// Very flakey with Webpack enabled
;(
process
.
env
.
IS_TURBOPACK_TEST
?
it
:
it
.
skip
)(
`should allow to change files while stopped (
${
name
}
)`
,
async
()
=>
{
let
fullInvalidation
=
!
cacheEnabled
let
fullInvalidation
=
!
cacheEnabled
for
(
const
change
of
changes
)
{
for
(
const
change
of
changes
)
{
await
change
.
checkInitial
()
await
change
.
checkInitial
()
...
@@ -307,7 +324,9 @@ for (const cacheEnabled of [false, true]) {
...
@@ -307,7 +324,9 @@ for (const cacheEnabled of [false, true]) {
expect
(
unchangedTimestamp
).
toEqual
(
timestamp
)
expect
(
unchangedTimestamp
).
toEqual
(
timestamp
)
await
browser
.
close
()
await
browser
.
close
()
}
}
},
200000
)
},
200000
)
}
}
})
})
}
}
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