fix: modify puppeteer arguments to fix test builds for ci keeweb/keeweb#2142

ref:
keeweb/keeweb#2142
This commit is contained in:
Aetherinox 2024-04-04 12:39:31 -07:00
parent f8af64e45b
commit 2aa6e05b53
No known key found for this signature in database
GPG Key ID: CB5C4C30CD0D4028
1 changed files with 5 additions and 4 deletions

View File

@ -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;