test: compare paths on Windows without considering case

PR-URL: https://github.com/nodejs/node/pull/53993
Fixes: https://github.com/nodejs/node/issues/53989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Early Riser authored and Marco Ippolito committed 2024-08-19 10:32:46 +02:00
1 parent 490f15a99b
commit f2b4fd3544
1 file changed
+8 -1
+8 -1
View File
@@ -52,7 +52,14 @@ function testCwd(options, expectPidType, expectCode = 0, expectData) {
});
child.on('close', common.mustCall(function() {
expectData && assert.strictEqual(data.trim(), expectData);
if (expectData) {
// In Windows, compare without considering case
if (common.isWindows) {
assert.strictEqual(data.trim().toLowerCase(), expectData.toLowerCase());
} else {
assert.strictEqual(data.trim(), expectData);
}
}
}));
return child;