silverwolf-x's picture
download
raw
1.17 kB
import { waitFor, retry } from 'next-test-utils'
import { nextTestSetup } from 'e2e-utils'
describe('app-fetch-deduping', () => {
const { next, isTurbopack } = nextTestSetup({ files: __dirname })
const itSkipTurbopack = isTurbopack ? it.skip : it
// This solution consistently works in Webpack but is flaky in Turbopack.
// This will require a follow-up
itSkipTurbopack(
'should still properly cache fetches when the user has a custom fetch implementation',
async () => {
const browser = await next.browser('/')
let currentValue: string | undefined
await retry(async () => {
const initialRandom = await browser.elementById('random').text()
expect(initialRandom).toMatch(/^0\.\d+$/)
await browser.refresh()
currentValue = await browser.elementById('random').text()
expect(currentValue).toBe(initialRandom)
})
// wait for the revalidation period
await waitFor(3000)
await retry(async () => {
await browser.refresh()
const finalValue = await browser.elementById('random').text()
expect(finalValue).not.toBe(currentValue)
})
}
)
})

Xet Storage Details

Size:
1.17 kB
·
Xet hash:
7d0d9a523073a95d63e983adf904b95b4e23c5f015c76fa77ed8e6c3a202a0c6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.