Logo
Explore Help
Sign In
OSSForks/node
1
0
Fork 0
You've already forked node
mirror of https://github.com/zebrajr/node.git synced 2026-01-15 12:15:26 +00:00
Code Issues Actions 8 Packages Projects Releases Wiki Activity
Files
7b7004a0ed22dd5d413c24381bb877442604a264
node/test/message/assert_throws_stack.js

7 lines
144 B
JavaScript
Raw Normal View History

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. PR-URL: https://github.com/nodejs/node/pull/18595 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-06 11:08:23 +01:00
'use strict';
require('../common');
tools: add lint rule to ensure assertions are reached PR-URL: https://github.com/nodejs/node/pull/60125 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-10-07 14:40:05 +02:00
const assert = require('assert/strict');
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. PR-URL: https://github.com/nodejs/node/pull/18595 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-06 11:08:23 +01:00
assert.throws(() => { throw new Error('foo'); }, { bar: true });
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 480ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API