Skip to content

Commit

Permalink
Tests: Fix bad test case that always passes
Browse files Browse the repository at this point in the history
Follows-up #1335, which was missing
the quotes on the tap-outputs key, and thus the unit test was seeing
expectedOutput[command] as `undefined`, which was then passed to
RegExp as `new RegExp(undefined)`, which produces /(?:)/, which is a
no-op that always matches, so re.test(output) === true.

Yay me for writing a useless test.

Ref #1333.
  • Loading branch information
Krinkle committed Jan 3, 2019
1 parent 681cee7 commit 2fb0e08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/cli/fixtures/expected/tap-outputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ok 2 Second > 1
# todo 0
# fail 0`,

"qunit 'fail/throws-match.js'":
"qunit fail/throws-match.js":
`TAP version 13
not ok 1 global failure
---
Expand Down

0 comments on commit 2fb0e08

Please sign in to comment.