Skip to content

Commit ffe964b

Browse files
committed
chore: simplify
1 parent 1bb0c8a commit ffe964b

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

lighthouse-setup.cjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ module.exports = async function setup(browser, { url }) {
1616
localStorage.setItem('npmx-color-mode', mode)
1717
}, colorMode)
1818

19-
await page.goto(url, { waitUntil: 'networkidle0' })
19+
// Navigate and wait for DOM only - Lighthouse will do its own full load
20+
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 })
2021

21-
// Also set the data-theme attribute directly to ensure the mode is applied
22-
await page.evaluate(mode => {
23-
document.documentElement.setAttribute('data-theme', mode)
24-
}, colorMode)
25-
26-
// Close the page - Lighthouse will open its own
22+
// Close the page - Lighthouse will open its own with localStorage already set
2723
await page.close()
2824
}

0 commit comments

Comments
 (0)