test: fix assertSnapshot when path contains a quote

PR-URL: https://github.com/nodejs/node/pull/55087
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
Antoine du Hamel 2024-09-25 21:42:12 +02:00 committed by GitHub
parent 18800da280
commit bdddc04dff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {