Skip to content

Commit 7671032

Browse files
davidtaylorhqmartin-brennan
authored andcommitted
DEV: Enable local-storage for smoke test (#34060)
The localStorage API has been a web standard for a very long time. It's safe to assume it'll be available in all users browsers, so it makes sense for the smoke test to match. Also adds console logs to the smoke-test output, to make debugging failures easier.
1 parent a5b8633 commit 7671032

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/smoke-test.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ import puppeteer from "puppeteer-core";
2020
executablePath: Launcher.getInstallations()[0],
2121
// when debugging locally setting the SHOW_BROWSER env variable can be very helpful
2222
headless: process.env.SHOW_BROWSER === undefined,
23-
args: ["--disable-local-storage", "--no-sandbox"],
23+
args: ["--no-sandbox"],
2424
});
2525
const page = await browser.newPage();
26+
page.on("console", (msg) => {
27+
if (["error", "warning"].includes(msg.type())) {
28+
console.log(`PAGE ${msg.type().toUpperCase()}: ${msg.text()}`);
29+
}
30+
});
31+
page.on("pageerror", (err) => console.log(`PAGE ERROR: ${err.message}`));
2632

2733
await page.setViewport({
2834
width: 1366,

0 commit comments

Comments
 (0)