File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -527,12 +527,19 @@ it('async stack frames: Promise.any', async function() {
527
527
} ) ;
528
528
529
529
it ( 'wasm stack frames' , async function ( ) {
530
+ const wasmFrame = semver . gte ( process . versions . node , '16.0.0' )
531
+ ? String . raw `wasm:\/\/wasm\/c2de0ab2:wasm-function\[1\]:0x3b`
532
+ : semver . gte ( process . versions . node , '14.0.0' )
533
+ ? String . raw `call_js_function \(<anonymous>:wasm-function\[1\]:0x3b\)`
534
+ // Node 12
535
+ : String . raw `wasm-function\[1\]:0x3b` ;
536
+
530
537
await compareStackTrace ( createMultiLineSourceMap ( ) , [
531
538
'return require("./test-fixtures/wasm/wasm.js").call_js_function(() => { throw new Error("test"); });'
532
539
] , [
533
540
'Error: test' ,
534
541
re `^ at ${ stackFramePathStartsWith ( ) } (?:.*[/\\])?line1.js:1001:101$` ,
535
- re `^ at wasm:\/\/wasm\/c2de0ab2:wasm-function\[1\]:0x3b $` ,
542
+ re `^ at ${ wasmFrame } $` ,
536
543
re `^ at Object\.exports\.call_js_function \(.*[/\\]wasm\.js:13:24\)$` ,
537
544
] ) ;
538
545
} ) ;
You can’t perform that action at this time.
0 commit comments