Skip to content

Commit f2b4fd3

Browse files
injunchoi98marco-ippolito
authored andcommitted
test: compare paths on Windows without considering case
PR-URL: #53993 Fixes: #53989 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 490f15a commit f2b4fd3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/parallel/test-child-process-cwd.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ function testCwd(options, expectPidType, expectCode = 0, expectData) {
5252
});
5353

5454
child.on('close', common.mustCall(function() {
55-
expectData && assert.strictEqual(data.trim(), expectData);
55+
if (expectData) {
56+
// In Windows, compare without considering case
57+
if (common.isWindows) {
58+
assert.strictEqual(data.trim().toLowerCase(), expectData.toLowerCase());
59+
} else {
60+
assert.strictEqual(data.trim(), expectData);
61+
}
62+
}
5663
}));
5764

5865
return child;

0 commit comments

Comments
 (0)