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;