Skip to content

Commit 8953715

Browse files
authored
test: use expect.poll in build-old playground (#20904)
1 parent 73b6d24 commit 8953715

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

playground/build-old/__tests__/build-old.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import { findAssetFile, isBuild, page } from '~utils'
33

44
describe('syntax preserve', () => {
55
test('import.meta.url', async () => {
6-
expect(await page.textContent('.import-meta-url')).toBe('string')
6+
await expect.poll(() => page.textContent('.import-meta-url')).toBe('string')
77
})
88
test('dynamic import', async () => {
9-
expect(await page.textContent('.dynamic-import')).toBe('success')
9+
await expect.poll(() => page.textContent('.dynamic-import')).toBe('success')
1010
})
1111
})
1212

1313
describe('syntax is lowered', () => {
1414
test('private field', async () => {
15-
expect(await page.textContent('.private-field')).toBe('private')
15+
await expect.poll(() => page.textContent('.private-field')).toBe('private')
1616

1717
if (isBuild) {
1818
const content = findAssetFile(/index-[-\w]{8}\.js/)

0 commit comments

Comments
 (0)