Unverified Commit b408d733 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix flakey preload test (#30969)

parent 0c494af9
...@@ -378,7 +378,8 @@ describe('Prefetching Links in viewport', () => { ...@@ -378,7 +378,8 @@ describe('Prefetching Links in viewport', () => {
})()`) })()`)
console.log({ linkHrefs, scriptSrcs }) console.log({ linkHrefs, scriptSrcs })
expect(linkHrefs.some((href) => scriptSrcs.includes(href))).toBe(false) expect(scriptSrcs.some((src) => src.includes('pages/index-'))).toBe(true)
expect(linkHrefs.some((href) => href.includes('pages/index-'))).toBe(false)
}) })
it('should not duplicate prefetches', async () => { it('should not duplicate prefetches', async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment