Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
assert: revert breaking change
It was not intended to change the `assert.doesNotThrow()` message
with #23223. This reverts the
breaking behavior to the one before.
  • Loading branch information
BridgeAR committed Dec 2, 2018
commit bd7004fed4e29bf5b14662aca6acc2f250cb7238
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