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:
Ruben Bridgewater authored and Myles Borins committed 2018-10-31 13:45:11 -04:00
1 parent 562787efb2
commit 18071db274
3 files changed
+35 -19

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
'use strict';
require('../common');
const assert = require('assert').strict;
assert.throws(() => { throw new Error('foo'); }, { bar: true });