Skip to content

Commit a5972dc

Browse files
committed
feat: gather-telemetry now takes optional puppeteerArgs resolves #8
1 parent 29967b7 commit a5972dc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/gather/gather-telemetry.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
const puppeteer = require('puppeteer');
22
const { setTelemetry } = require('../utils/telemetry');
33

4-
module.exports = async function gatherTelemetry(url) {
5-
const browser = await puppeteer.launch({ ignoreHTTPSErrors: true });
4+
const DEFAULT_PUPPETEER_ARGS = { ignoreHTTPSErrors: true };
5+
6+
module.exports = async function gatherTelemetry(url, puppeteerArgs = {}) {
7+
Object.assign(puppeteerArgs, DEFAULT_PUPPETEER_ARGS);
8+
9+
const browser = await puppeteer.launch(puppeteerArgs);
610
const page = await browser.newPage();
711

812
await page.goto(url);

0 commit comments

Comments
 (0)