Skip to content

Commit a17ebb2

Browse files
committed
test: ignore case when comparing paths on Windows
Fixes: nodejs#53989
1 parent 1c1c9bf commit a17ebb2

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) return;
56+
57+
if (common.isWindows) {
58+
data = data.toLowerCase();
59+
expectData = expectData.toLowerCase();
60+
}
61+
62+
assert.strictEqual(data.trim(), expectData);
5663
}));
5764

5865
return child;

0 commit comments

Comments
 (0)