From e9f68ea6cb78434fed9ddedef546c9780e091109 Mon Sep 17 00:00:00 2001 From: Nika Begiashvili Date: Thu, 18 Jan 2024 19:38:22 +0400 Subject: [PATCH] fix docs and tests --- README.md | 4 ---- test/testutils.js | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e4a8f7b..656496b 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,6 @@ build status - - dependency status - license diff --git a/test/testutils.js b/test/testutils.js index 234dc31..6acc0ed 100644 --- a/test/testutils.js +++ b/test/testutils.js @@ -1,6 +1,6 @@ const StaticServer = require("static-server"); const puppeteer = require("puppeteer"); -//const isWsl = require("is-wsl"); +const isWsl = require("is-wsl"); const port = 8787; const width = 800; const height = 600; @@ -20,11 +20,11 @@ const startServer = () => module.exports = { setup: async () => { - let browser = await puppeteer.launch({ + let browser = isWsl ? await puppeteer.launch({ headless: "new", executablePath: "google-chrome", args: ["--no-sandbox"], - }); + }) : await puppeteer.launch({headless: 'new'}); let page = await browser.newPage(); await page.setViewport({ width, height });