Skip to content

Commit

Permalink
assert: revert breaking change
Browse files Browse the repository at this point in the history
It was not intended to change the `assert.doesNotThrow()` message
with nodejs#23223. This reverts the
breaking behavior to the one before.
  • Loading branch information
BridgeAR committed Dec 2, 2018
1 parent ffe1f80 commit bd7004f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ function expectsNoError(stackStartFn, actual, error, message) {
actual,
expected: error,
operator: stackStartFn.name,
message: `Got unwanted ${fnType}${details}\n${actual.message}`,
message: `Got unwanted ${fnType}${details}`,
stackStartFn
});
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ common.expectsError(
type: a.AssertionError,
code: 'ERR_ASSERTION',
operator: 'doesNotThrow',
message: 'Got unwanted exception: user message\n[object Object]'
message: 'Got unwanted exception: user message'
}
);

Expand Down

0 comments on commit bd7004f

Please sign in to comment.