@@ -354,6 +354,63 @@ describe('Stack parsing', () => {
354354 ] ) ;
355355 } ) ;
356356
357+ test ( 'parses with async frames Windows' , ( ) => {
358+ // https://github.com/getsentry/sentry-javascript/issues/4692#issuecomment-1063835795
359+ const err = new Error ( ) ;
360+ err . stack =
361+ 'Error: Client request error\n' +
362+ ' at Object.httpRequestError (file:///C:/code/node_modules/@waroncancer/gaia/lib/error/error-factory.js:17:73)\n' +
363+ ' at Object.run (file:///C:/code/node_modules/@waroncancer/gaia/lib/http-client/http-client.js:81:36)\n' +
364+ ' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
365+ ' at async Object.send (file:///C:/code/lib/post-created/send-post-created-notification-module.js:17:27)\n' +
366+ ' at async each (file:///C:/code/lib/process-post-events-module.js:14:21)\n' ;
367+
368+ const frames = parseStackFrames ( stackParser , err ) ;
369+
370+ expect ( frames ) . toEqual ( [
371+ {
372+ filename : 'C:/code/lib/process-post-events-module.js' ,
373+ module : 'process-post-events-module' ,
374+ function : 'each' ,
375+ lineno : 14 ,
376+ colno : 21 ,
377+ in_app : true ,
378+ } ,
379+ {
380+ filename : 'C:/code/lib/post-created/send-post-created-notification-module.js' ,
381+ module : 'send-post-created-notification-module' ,
382+ function : 'Object.send' ,
383+ lineno : 17 ,
384+ colno : 27 ,
385+ in_app : true ,
386+ } ,
387+ {
388+ filename : 'node:internal/process/task_queues' ,
389+ module : 'task_queues' ,
390+ function : 'processTicksAndRejections' ,
391+ lineno : 96 ,
392+ colno : 5 ,
393+ in_app : false ,
394+ } ,
395+ {
396+ filename : 'C:/code/node_modules/@waroncancer/gaia/lib/http-client/http-client.js' ,
397+ module : '@waroncancer.gaia.lib.http-client:http-client' ,
398+ function : 'Object.run' ,
399+ lineno : 81 ,
400+ colno : 36 ,
401+ in_app : false ,
402+ } ,
403+ {
404+ filename : 'C:/code/node_modules/@waroncancer/gaia/lib/error/error-factory.js' ,
405+ module : '@waroncancer.gaia.lib.error:error-factory' ,
406+ function : 'Object.httpRequestError' ,
407+ lineno : 17 ,
408+ colno : 73 ,
409+ in_app : false ,
410+ } ,
411+ ] ) ;
412+ } ) ;
413+
357414 test ( 'parses with colons in paths' , ( ) => {
358415 const err = new Error ( ) ;
359416 err . stack =
0 commit comments