Files
JJ Kasper ce738b9f8c Disable jest cache for CI instead of wiping (#90097)
This is aiming to fix sporadic failures from jest transforms which is
most likely caused by the change to output to custom jest-cache folder
and wipe that between runs. Instead this disables the cache via
`--no-cache` flag and also fixes WASM bindings issue that started due to
cache not being available.

x-ref:
https://github.com/vercel/next.js/actions/runs/22109996356/job/63903450669?pr=90096#step:35:493
x-ref:
https://github.com/vercel/next.js/actions/runs/22109996356/job/63903820197?pr=90096#step:35:18167
2026-02-17 10:34:54 -08:00

18 lines
443 B
TypeScript

let loggedTurbopack = false
export function shouldUseTurbopack(): boolean {
if (!!process.env.NEXT_TEST_WASM || !!process.env.NEXT_TEST_WASM_AFTER_JEST) {
return false
}
const enabled = !!process.env.IS_TURBOPACK_TEST
if (enabled && !loggedTurbopack) {
require('console').log(
`Running tests with turbopack because environment variable IS_TURBOPACK_TEST is set`
)
loggedTurbopack = true
}
return enabled
}