Skip to content

Commit

Permalink
test: reduce ssr-conditions test flakiness (#14662)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Oct 17, 2023
1 parent af60592 commit 3c16b71
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions playground/ssr-conditions/__tests__/ssr-conditions.spec.ts
Original file line number Diff line number Diff line change
@@ -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}`

Expand All @@ -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',
)
})
})

0 comments on commit 3c16b71

Please sign in to comment.