From a20bf9a84daaee8330d17aac85bfe75a2b3b6058 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 13 Feb 2026 20:39:13 +0100 Subject: [PATCH] test: allow filtering async internal frames in assertSnapshot PR-URL: https://github.com/nodejs/node/pull/61769 Reviewed-By: Matteo Collina Reviewed-By: Daijiro Wachi Reviewed-By: Geoffrey Booth Reviewed-By: Chengzhong Wu Reviewed-By: Rafael Gonzaga Reviewed-By: Jacob Smith --- test/common/assertSnapshot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js index 91e71888258..9a7482020e0 100644 --- a/test/common/assertSnapshot.js +++ b/test/common/assertSnapshot.js @@ -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