assert: revert breaking change · nodejs/node@62fb5db · GitHub
Skip to content

Commit 62fb5db

Browse files
BridgeARBethGriggs
authored andcommitted
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. PR-URL: #24786 Refs: #23223 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent 74c1074 commit 62fb5db

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/assert.js

Lines changed: 1 addition & 1 deletion

test/parallel/test-assert-async.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ common.crashOnUnhandledRejection();
3434
assert(err instanceof assert.AssertionError,
3535
`${err.name} is not instance of AssertionError`);
3636
assert.strictEqual(err.code, 'ERR_ASSERTION');
37-
assert(/^Got unwanted rejection\.\n$/.test(err.message));
37+
assert(/^Got unwanted rejection\.$/.test(err.message));
3838
assert.strictEqual(err.operator, 'doesNotReject');
3939
assert.ok(!err.stack.includes('at Function.doesNotReject'));
4040
return true;

test/parallel/test-assert.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)