From 2aa6e05b53c6ccafb1801b4d982041b19536959b Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Thu, 4 Apr 2024 12:39:31 -0700 Subject: [PATCH] fix: modify puppeteer arguments to fix test builds for ci keeweb/keeweb#2142 ref: keeweb/keeweb#2142 --- build/tasks/grunt-run-test.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/tasks/grunt-run-test.js b/build/tasks/grunt-run-test.js index 9605d902..39599c45 100644 --- a/build/tasks/grunt-run-test.js +++ b/build/tasks/grunt-run-test.js @@ -3,21 +3,22 @@ module.exports = function (grunt) { const done = this.async(); const opt = this.options(); const file = this.files[0].src[0]; - const path = require('path'); const puppeteer = require('puppeteer'); - (async function () { grunt.log.writeln('Running tests...'); const fullPath = 'file://' + path.resolve(file); const browser = await puppeteer.launch({ - headless: opt.headless + headless: opt.headless, + executablePath: process.env.CHROME_BIN || null, + args: ['--disable-dev-shm-usage'] }); + grunt.log.writeln('puppeteer launched...'); const page = await browser.newPage(); await page.goto(fullPath); - + async function check() { const result = await page.evaluate(() => { const { output, done } = window;