From bdddc04dff8cc1868c6e9d6bf97f62e0d3dff371 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 25 Sep 2024 21:42:12 +0200 Subject: [PATCH] test: fix `assertSnapshot` when path contains a quote PR-URL: https://github.com/nodejs/node/pull/55087 Reviewed-By: Luigi Pinca Reviewed-By: Moshe Atlow Reviewed-By: Mohammed Keyvanzadeh --- 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 e0793ce5394..dbd4a607986 100644 --- a/test/common/assertSnapshot.js +++ b/test/common/assertSnapshot.js @@ -25,7 +25,7 @@ function replaceWindowsPaths(str) { } function replaceFullPaths(str) { - return str.replaceAll(path.resolve(__dirname, '../..'), ''); + return str.replaceAll('\\\'', "'").replaceAll(path.resolve(__dirname, '../..'), ''); } function transform(...args) {