Skip to content

Commit

Permalink
fix(test): ensure that grunt test:client exits with non-zero code
Browse files Browse the repository at this point in the history
Apparently it is not enough to check `code`, because when process
crashes `code` is set to `null` and `err` is passed instead.

Example of failing tests, which didn't fail build:
https://travis-ci.org/karma-runner/karma/jobs/537027667#L1046
  • Loading branch information
devoto13 committed Jul 25, 2019
1 parent 5614c04 commit db37186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function (grunt) {

function exec (args, failMsg) {
spawnKarma(args, function (err, result, code) {
if (code) {
if (code || err) {
console.error(err)
grunt.fail.fatal(failMsg, code)
} else {
Expand Down

0 comments on commit db37186

Please sign in to comment.