mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
assert: fix throws trace
The current stack trace thrown in case `assert.throws(fn, object)` is used did not filter the stack trace. This fixes it. Backport-PR-URL: https://github.com/nodejs/node/pull/23223 PR-URL: https://github.com/nodejs/node/pull/18595 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit is contained in:
1 parent
562787efb2
commit
18071db274
3 files changed
+35
-19
No files matched your search
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const assert = require('assert').strict;
|
||||
|
||||
assert.throws(() => { throw new Error('foo'); }, { bar: true });
|
||||
Reference in new issue
Block a user