Unverified Commit 2484e93d authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

temporarily skip flaky turbopack build test (#72488)

Need to investigate why this flakes only in Turbopack. Disabling in that
context for now.
parent a4220540
/* eslint-disable jest/no-standalone-expect */
import { waitFor, retry } from 'next-test-utils' import { waitFor, retry } from 'next-test-utils'
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
describe('app-fetch-deduping', () => { describe('app-fetch-deduping', () => {
const { next } = nextTestSetup({ files: __dirname }) const { next, isTurbopack } = nextTestSetup({ files: __dirname })
it('should still properly cache fetches when the user has a custom fetch implementation', async () => { const itSkipTurbopack = isTurbopack ? it.skip : it
const browser = await next.browser('/')
let currentValue: string | undefined // This solution consistently works in Webpack but is flaky in Turbopack.
await retry(async () => { // This will require a follow-up
const initialRandom = await browser.elementById('random').text() itSkipTurbopack(
expect(initialRandom).toMatch(/^0\.\d+$/) 'should still properly cache fetches when the user has a custom fetch implementation',
async () => {
const browser = await next.browser('/')
await browser.refresh() let currentValue: string | undefined
currentValue = await browser.elementById('random').text() await retry(async () => {
expect(currentValue).toBe(initialRandom) const initialRandom = await browser.elementById('random').text()
}) expect(initialRandom).toMatch(/^0\.\d+$/)
// wait for the revalidation period await browser.refresh()
await waitFor(3000) currentValue = await browser.elementById('random').text()
expect(currentValue).toBe(initialRandom)
})
await retry(async () => { // wait for the revalidation period
await browser.refresh() await waitFor(3000)
const finalValue = await browser.elementById('random').text()
expect(finalValue).not.toBe(currentValue) await retry(async () => {
}) await browser.refresh()
}) const finalValue = await browser.elementById('random').text()
expect(finalValue).not.toBe(currentValue)
})
}
)
}) })
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