We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0f26ce commit afce912Copy full SHA for afce912
lib/internal/assert/assertion_error.js
@@ -300,6 +300,9 @@ class AssertionError extends Error {
300
stackStartFn
301
} = options;
302
303
+ const limit = Error.stackTraceLimit;
304
+ Error.stackTraceLimit = 0;
305
+
306
if (message != null) {
307
super(String(message));
308
} else {
@@ -387,6 +390,8 @@ class AssertionError extends Error {
387
390
}
388
391
389
392
393
+ Error.stackTraceLimit = limit;
394
395
this.generatedMessage = !message;
396
Object.defineProperty(this, 'name', {
397
value: 'AssertionError [ERR_ASSERTION]',
0 commit comments