Skip to content

Commit

Permalink
Use puppeteer instead of phantomjs-prebuilt
Browse files Browse the repository at this point in the history
Signed-off-by: pruthvireddy1991 <pruthvi.reddy@puresoftware.com>
  • Loading branch information
pruthvireddypuresoftware authored and DanielRuf committed Nov 2, 2019
1 parent dec4623 commit 3a72ed2
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 443 deletions.
12 changes: 9 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,21 @@ module.exports = function(grunt) {
return details.failed;
}

var phantomjs = require('phantomjs-prebuilt').path;
grunt.registerMultiTask('qunit', function() {
var done = this.async();
var errors = [];

function run(testType, binPath, testPath) {
var testrunner;
if (testType === 'web') {
testrunner = 'test-chrome.js';
}
else {
testrunner = 'test.js';
}
grunt.util.spawn({
cmd: binPath,
args: ['test.js', testPath]
args: [testrunner, testPath]
}, function(error, result) {
if (error) {
grunt.log.error(result.stderr);
Expand All @@ -158,7 +164,7 @@ module.exports = function(grunt) {
}

run('node', process.argv[0], this.data[0]);
run('web', phantomjs, this.data[1]);
run('web', process.argv[0], this.data[1]);
});

grunt.registerMultiTask('replace', function() {
Expand Down

0 comments on commit 3a72ed2

Please sign in to comment.