Skip to content

Commit

Permalink
[Refactor] generalize error message from calling .end more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 29, 2019
1 parent faa51b5 commit da8ca46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/test.js
Expand Up @@ -151,7 +151,7 @@ Test.prototype.end = function (err) {
}

if (this.calledEnd) {
this.fail('.end() called twice');
this.fail('.end() already called');
}
this.calledEnd = true;
this._end();
Expand Down
4 changes: 2 additions & 2 deletions test/double_end.js
Expand Up @@ -39,12 +39,12 @@ test(function (t) {
'TAP version 13',
'# double end',
'ok 1 should be equal',
'not ok 2 .end() called twice',
'not ok 2 .end() already called',
' ---',
' operator: fail',
' ' + atExpected,
' stack: |-',
' Error: .end() called twice',
' Error: .end() already called',
' [... stack stripped ...]',
' ' + stackExpected,
' [... stack stripped ...]',
Expand Down

0 comments on commit da8ca46

Please sign in to comment.