Skip to content

Commit 22d81b1

Browse files
authored
fix: run ci in headless mode (#83)
1 parent 2a05c1a commit 22d81b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

puppeteer-demo/demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const sleep = (ms: number | undefined) => new Promise((r) => setTimeout(r, ms));
66
Promise.resolve(
77
(async () => {
88
const browser = await puppeteer.launch({
9-
headless: false, // 'false' means we can see the browser window
9+
headless: !!process.env.CI, // 'false' means we can see the browser window, the CI environment only supports headless mode.
1010
args: ['--no-sandbox', '--disable-setuid-sandbox'],
1111
});
1212

0 commit comments

Comments
 (0)