Skip to content

Commit 1489e9a

Browse files
devoto13johnjbarton
authored andcommitted
fix(test): test:client silently failing on Travis (#3343)
* fix(test): ensure that grunt test:client exits with non-zero code 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 * fix(test): adjust assertions to work in latest Chrome
1 parent 094bcc6 commit 1489e9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tasks/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function (grunt) {
2626

2727
function exec (args, failMsg) {
2828
spawnKarma(args, function (err, result, code) {
29-
if (code) {
29+
if (code || err) {
3030
console.error(err)
3131
grunt.fail.fatal(failMsg, code)
3232
} else {

test/e2e/error.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Feature: Error Display
1616
When I start Karma
1717
Then it fails with:
1818
"""
19-
SyntaxError: Unexpected token }
19+
SyntaxError: Unexpected token '}'
2020
"""
2121
Scenario: Not single-run Syntax Error in a test file
2222
Given a configuration with:
@@ -32,5 +32,5 @@ Feature: Error Display
3232
When I runOut Karma
3333
Then it fails with like:
3434
"""
35-
SyntaxError: Unexpected token }
35+
SyntaxError: Unexpected token '}'
3636
"""

0 commit comments

Comments
 (0)