mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: allow filtering async internal frames in assertSnapshot
PR-URL: https://github.com/nodejs/node/pull/61769 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Jacob Smith <jacob@frende.me>
This commit is contained in:
1 parent
ec2913f036
commit
a20bf9a84d
1 file changed
+1
-1
@@ -18,7 +18,7 @@ const { hostname } = require('node:os');
|
||||
* Group 6: Line end (including color codes and `{` which indicates the start of an error object details)
|
||||
*/
|
||||
// Mappings: (g1 ) (g2 ) (g3 ) (g4 ) (g5 ) (g6 )
|
||||
const internalStackFramesRegexp = /(?<=\n)(\s*(?:\x1b?\[\d+m\s+)?(?:at\s)?)(?:(.+?)\s+\()?(?:(node:.+?):(\d+)(?::(\d+))?)\)?((?:\x1b?\[\d+m)?\s*{?\n|$)/g;
|
||||
const internalStackFramesRegexp = /(?<=\n)(\s*(?:\x1b?\[\d+m\s+)?(?:at\s+)?)(?:async\s+)?(?:(.+?)\s+\()?(?:(node:.+?):(\d+)(?::(\d+))?)\)?((?:\x1b?\[\d+m)?\s*{?\n|$)/g;
|
||||
/**
|
||||
* Group 1: Filename
|
||||
* Group 2: Line number
|
||||
|
||||
Reference in new issue
Block a user