Skip to content

Commit 5d667aa

Browse files
fix test
1 parent 27a563e commit 5d667aa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

e2e/react-start/basic/tests/script-duplication.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ test.describe('Script Duplication Prevention', () => {
3737
// a queryable form. Execution is the reliable check.
3838
await page.waitForFunction(() => (window as any).SCRIPT_1 === true)
3939

40-
// The script element should exist either as a React 19 hoisted resource
41-
// or as an imperatively-created element from useEffect.
4240
const scriptCount = await page.evaluate(() => {
43-
return document.querySelectorAll('script[src$="/script.js"]').length
41+
return document.querySelectorAll('script[src="/script.js"]').length
4442
})
45-
expect(scriptCount).toBeGreaterThanOrEqual(1)
43+
expect(scriptCount).toBeLessThanOrEqual(1)
4644

4745
expect(await page.evaluate('window.SCRIPT_1')).toBe(true)
4846
})

0 commit comments

Comments
 (0)