()
| 346 | '/ssg/basic' |
| 347 | ) |
| 348 | async function hasSsgScript() { |
| 349 | const scripts = await browser.elementsByCss( |
| 350 | // Mouse hover is a high-priority fetch |
| 351 | 'script:not([async])' |
| 352 | ) |
| 353 | let scriptFound = false |
| 354 | for (const aScript of scripts) { |
| 355 | const href = await aScript.getAttribute('src') |
| 356 | if (href.includes(chunkBasic)) { |
| 357 | scriptFound = true |
| 358 | break |
| 359 | } |
| 360 | } |
| 361 | return scriptFound |
| 362 | } |
| 363 | |
| 364 | await waitFor(2 * 1000) |
| 365 | expect(await hasSsgScript()).toBe(false) |
no test coverage detected