mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test_runner: fix global after not failing the tests
PR-URL: https://github.com/nodejs/node/pull/48913 Backport-PR-URL: https://github.com/nodejs/node/pull/49225 Fixes: https://github.com/nodejs/node/issues/48867 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This commit is contained in:
1 parent
08738b2664
commit
4bc0a8fe99
6 files changed
+103
-34
No files matched your search
@@ -20,6 +20,10 @@ function replaceWindowsPaths(str) {
|
||||
return common.isWindows ? str.replaceAll(path.win32.sep, path.posix.sep) : str;
|
||||
}
|
||||
|
||||
function replaceFullPaths(str) {
|
||||
return str.replaceAll(process.cwd(), '');
|
||||
}
|
||||
|
||||
function transform(...args) {
|
||||
return (str) => args.reduce((acc, fn) => fn(acc), str);
|
||||
}
|
||||
@@ -79,6 +83,7 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ...
|
||||
module.exports = {
|
||||
assertSnapshot,
|
||||
getSnapshotPath,
|
||||
replaceFullPaths,
|
||||
replaceStackTrace,
|
||||
replaceWindowsLineEndings,
|
||||
replaceWindowsPaths,
|
||||
|
||||
Reference in new issue
Block a user