We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f76732 commit 3da8d5cCopy full SHA for 3da8d5c
test/common/assertSnapshot.js
@@ -60,11 +60,14 @@ function replaceWarningPid(str) {
60
// The project root path may contain unicode characters.
61
function transformProjectRoot(replacement = '<project-root>') {
62
const projectRoot = path.resolve(__dirname, '../..');
63
+ // Handles output already processed by `replaceWindowsPaths`.
64
+ const winPath = replaceWindowsPaths(projectRoot);
65
// Handles URL encoded project root in file URL strings as well.
66
const urlEncoded = pathToFileURL(projectRoot).pathname;
67
return (str) => {
68
return str.replaceAll('\\\'', "'")
69
.replaceAll(projectRoot, replacement)
70
+ .replaceAll(winPath, replacement)
71
.replaceAll(urlEncoded, replacement);
72
};
73
}
0 commit comments