File: import-fix-from-2.0.1.patch

package info (click to toggle)
node-assertion-error 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 148 kB
  • sloc: javascript: 125; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: import fix from 2.0.1
 Needed for node-chai
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2025-08-24

--- a/mod.ts
+++ b/mod.ts
@@ -20,7 +20,8 @@
 
   constructor(public message = 'Unspecified AssertionError', props?: T, ssf?: Function) {
     super(message)
-    if (canElideFrames && ssf) startStackFrames.set(this, ssf)
+    // @ts-ignore
+    if (canElideFrames) Error.captureStackTrace(this, ssf || AssertionError);
     for (const key in props) {
       if (!(key in this)) {
         // @ts-ignore