mirror of https://github.com/keeweb/keeweb.git
fix: modify puppeteer arguments to fix test builds for ci keeweb/keeweb#2142
ref: keeweb/keeweb#2142
This commit is contained in:
parent
f8af64e45b
commit
2aa6e05b53
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue