You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/tools/console.test.ts
+58Lines changed: 58 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -315,5 +315,63 @@ describe('console', () => {
315
315
t.assert.snapshot?.(rawText);
316
316
});
317
317
});
318
+
319
+
it('applies source maps to stack traces of uncaught exceptions with cause',asynct=>{
320
+
server.addRoute('/main.min.js',(_req,res)=>{
321
+
res.setHeader('Content-Type','text/javascript');
322
+
res.statusCode=200;
323
+
res.end(`function r(){throw new Error("b00m!")}function o(){try{r()}catch(r){throw new Error("bar failed",{cause:r})}}(function r(){try{o()}catch(r){throw new Error("foo failed",{cause:r})}})();
it('applies source maps to stack traces of Error object (with cause) console.log arguments',asynct=>{
349
+
server.addRoute('/main.min.js',(_req,res)=>{
350
+
res.setHeader('Content-Type','text/javascript');
351
+
res.statusCode=200;
352
+
res.end(`function o(){throw new Error("b00m!")}function r(){try{o()}catch(o){throw new Error("bar failed",{cause:o})}}(function o(){try{r()}catch(o){console.log("foo failed",o)}})();
0 commit comments