diff --git a/playground/ssr-conditions/__tests__/ssr-conditions.spec.ts b/playground/ssr-conditions/__tests__/ssr-conditions.spec.ts index 76ec36363f1309..f8d1b4f930be5e 100644 --- a/playground/ssr-conditions/__tests__/ssr-conditions.spec.ts +++ b/playground/ssr-conditions/__tests__/ssr-conditions.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from 'vitest' import { port } from './serve' -import { page } from '~utils' +import { page, withRetry } from '~utils' const url = `http://localhost:${port}` @@ -18,10 +18,14 @@ test('ssr.resolve.externalConditions affect externalized imports during ssr', as test('ssr.resolve settings do not affect non-ssr imports', async () => { await page.goto(url) - expect(await page.textContent('.browser-no-external-react-server')).toMatch( - 'default.js', - ) - expect(await page.textContent('.browser-external-react-server')).toMatch( - 'default.js', - ) + await withRetry(async () => { + expect(await page.textContent('.browser-no-external-react-server')).toMatch( + 'default.js', + ) + }) + await withRetry(async () => { + expect(await page.textContent('.browser-external-react-server')).toMatch( + 'default.js', + ) + }) })