Skip to content

Commit 10eb638

Browse files
injunchoi98marco-ippolito
authored andcommitted
test: compare paths on Windows without considering case
PR-URL: #53993 Fixes: #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>
1 parent fa3ecee commit 10eb638

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)