Unverified Commit 6536743f authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

test: gate the loading.js prefetch repro to prod without Cache Components

Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent accbe62f
...@@ -22,17 +22,16 @@ import { nextTestSetup } from 'e2e-utils' ...@@ -22,17 +22,16 @@ import { nextTestSetup } from 'e2e-utils'
const ITERATIONS = 10 const ITERATIONS = 10
const PREFETCH_DELAY_MS = 500 const PREFETCH_DELAY_MS = 500
// There's no prefetching in dev, and Cache Components uses per-segment
// prefetches instead of the loading-boundary prefetch, so the race only exists
// in production without Cache Components.
// @force-gate !dev
// @force-gate !cacheComponents
describe('router autoscroll - loading.js during in-flight prefetch', () => { describe('router autoscroll - loading.js during in-flight prefetch', () => {
const { next, isNextDev } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
}) })
if (isNextDev) {
// There's no prefetching in dev, so the race can't happen.
it('is skipped in dev', () => {})
return
}
for (let i = 0; i < ITERATIONS; i++) { for (let i = 0; i < ITERATIONS; i++) {
it(`shows loading.js when the prefetch lands after the navigation response (#${i})`, async () => { it(`shows loading.js when the prefetch lands after the navigation response (#${i})`, async () => {
let releasePrefetch: () => void = () => {} let releasePrefetch: () => void = () => {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment