grunt-contrib-qunit
Advanced tools
Comparing version 5.1.1 to 6.0.0
{ | ||
"name": "grunt-contrib-qunit", | ||
"description": "Run QUnit unit tests in a headless Chrome instance", | ||
"version": "5.1.1", | ||
"version": "6.0.0", | ||
"author": { | ||
@@ -12,3 +12,3 @@ "name": "Grunt Team", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=12" | ||
}, | ||
@@ -22,11 +22,11 @@ "main": "tasks/qunit.js", | ||
"p-each-series": "^2.1.0", | ||
"puppeteer": "^5.0.0" | ||
"puppeteer": "^9.0.0" | ||
}, | ||
"devDependencies": { | ||
"difflet": "^1.0.1", | ||
"grunt": "^1.1.0", | ||
"grunt-contrib-connect": "^2.1.0", | ||
"grunt-contrib-internal": "^6.0.1", | ||
"grunt": "^1.4.1", | ||
"grunt-contrib-connect": "^3.0.0", | ||
"grunt-contrib-internal": "^7.0.0", | ||
"grunt-contrib-jshint": "^2.1.0", | ||
"grunt-shell": "^3.0.1", | ||
"grunt-shell": "^4.0.0", | ||
"qunit": "^2.10.0" | ||
@@ -33,0 +33,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-qunit v5.1.1 [![Build Status](https://github.com/gruntjs/grunt-contrib-qunit/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-contrib-qunit/actions?workflow=Tests) | ||
# grunt-contrib-qunit v5.1.0 [![Build Status](https://github.com/gruntjs/grunt-contrib-qunit/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-contrib-qunit/actions?workflow=Tests) | ||
@@ -257,3 +257,3 @@ > Run QUnit unit tests in a headless Chrome instance | ||
* `qunit.fail.timeout`: when a QUnit test times out, usually due to a missing `QUnit.start()` call | ||
* `qunit.error.onError` `(message, stackTrace)`: when a JavaScript execution error occurs | ||
* `qunit.error.onError` `(err)`: when a JavaScript execution error occurs | ||
@@ -271,2 +271,3 @@ You may listen for these events like so: | ||
* 2022-04-03 v6.0.0 Puppeteer version to ^9.0.0. Updated dependencies. Minimum node version is now version 12. | ||
* 2021-04-18 v5.0.0 Puppeteer version to ^5.0.0. Dependency updates. | ||
@@ -302,2 +303,2 @@ * 2020-06-17 v4.0.0 Puppeteer version to v4.0.0. Dependency updates and typo fixes. Minimum node version is now version 10. | ||
*This file was generated on Fri Oct 01 2021 22:38:18.* | ||
*This file was generated on Sun Apr 03 2022 07:52:19.* |
@@ -270,4 +270,4 @@ /* | ||
eventBus.on('error.onError', function (msg, stackTrace) { | ||
grunt.event.emit('qunit.error.onError', msg, stackTrace); | ||
eventBus.on('error.onError', function (msg) { | ||
grunt.event.emit('qunit.error.onError', msg); | ||
}); | ||
@@ -382,4 +382,18 @@ | ||
if (options.console) { | ||
page.on('console', function() { | ||
var args = [].slice.apply(arguments); | ||
page.on('console', function(msg) { | ||
// The `msg` is a puppeteer.ConsoleMessage, which represents the console call | ||
// including multple arguments passed to it. | ||
// | ||
// msg.text() formats the arguments into a naive newline-joined string, and | ||
// includes error objects as a useless "JSHandle@error". | ||
// | ||
// msg.args() returns a JSHandle object for each argument, but all its | ||
// evaluation features happen asynchronously via the browser, and in this | ||
// event handler we can't await those easily as the grunt output will have | ||
// moved on to other tests. If we want to print these, we'd have to refactor | ||
// this so pEachSeries() below is aware of async code here. For now, we just | ||
// let the useless "JSHandle" through and rely on developers to stringify any | ||
// useful information ahead of time, e.g. `console.warn(String(err))`. | ||
// | ||
// Ref https://pptr.dev/#?product=Puppeteer&version=v9.0.0&show=api-class-consolemessage | ||
var colors = { | ||
@@ -389,7 +403,6 @@ 'error': 'red', | ||
}; | ||
for (var i = 0; i < args.length; ++i) { | ||
var txt = args[i].text(); | ||
var color = colors[args[i].type()]; | ||
grunt.log.writeln(color ? txt[color] : txt); | ||
} | ||
var txt = msg.text(); | ||
var color = colors[msg.type()]; | ||
grunt.log.writeln(color ? txt[color] : txt); | ||
// grunt.log.writeln(`${msg.location().url}:${msg.location().lineNumber}`.gray); // debug | ||
}); | ||
@@ -399,7 +412,5 @@ } | ||
// Surface uncaught exceptions | ||
page.on('pageerror', function() { | ||
var args = [].slice.apply(arguments); | ||
for (var i = 0; i < args.length; i++) { | ||
eventBus.emit('error.onError', args[i]); | ||
} | ||
// Ref https://pptr.dev/#?product=Puppeteer&version=v9.0.0&show=api-event-pageerror | ||
page.on('pageerror', function(err) { | ||
eventBus.emit('error.onError', err); | ||
}); | ||
@@ -406,0 +417,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35505
475
302
+ Addedagent-base@6.0.2(transitive)
+ Addeddevtools-protocol@0.0.869402(transitive)
+ Addedhttps-proxy-agent@5.0.1(transitive)
+ Addedpuppeteer@9.1.1(transitive)
- Removedagent-base@5.1.1(transitive)
- Removeddevtools-protocol@0.0.818844(transitive)
- Removedhttps-proxy-agent@4.0.0(transitive)
- Removedpuppeteer@5.5.0(transitive)
Updatedpuppeteer@^9.0.0