Last-Update: 2023-11-30
Forwarded: https://github.com/nodejs/node/pull/50980
Gbp-Pq: Topic build
Gbp-Pq: Name test_runner_escape_path.patch
}
const color = '(\\[\\d+m)';
-const stackTraceBasePath = new RegExp(`${color}\\(${process.cwd()}/?${color}(.*)${color}\\)`, 'g');
+const stackTraceBasePath = new RegExp(`${color}\\(${process.cwd().replace(/[\\^$*+?.()|[\]{}]/g, '\\$&')}/?${color}(.*)${color}\\)`, 'g');
function replaceSpecDuration(str) {
return str