Skip to content

Commit

Permalink
fix flakey assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Sep 30, 2024
1 parent 2fb6ca3 commit 7f22377
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/e2e/app-dir/revalidatetag-rsc/revalidatetag-rsc.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils'

describe('revalidateTag-rsc', () => {
const { next } = nextTestSetup({
Expand All @@ -13,9 +14,11 @@ describe('revalidateTag-rsc', () => {
expect(randomNumber).toEqual(randomNumber2)

await browser.elementByCss('#submit-form').click()
await browser.waitForIdleNetwork()
const randomNumber3 = await browser.elementById('data').text()
expect(randomNumber3).not.toEqual(randomNumber)

await retry(async () => {
const randomNumber3 = await browser.elementById('data').text()
expect(randomNumber3).not.toEqual(randomNumber)
})
})

it('should revalidate fetch cache if revalidateTag invoked via server component', async () => {
Expand Down

0 comments on commit 7f22377

Please sign in to comment.