From f2b4fd35446ad062c176fc48cb6fbbf97a19e153 Mon Sep 17 00:00:00 2001 From: Early Riser <80089617+EarlyRiser42@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:07:34 +0900 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Daeyeon Jeong Reviewed-By: Yagiz Nizipli Reviewed-By: Stefan Stojanovic Reviewed-By: Antoine du Hamel --- test/parallel/test-child-process-cwd.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-cwd.js b/test/parallel/test-child-process-cwd.js index b527b7f9ea8012..e876361b167ffb 100644 --- a/test/parallel/test-child-process-cwd.js +++ b/test/parallel/test-child-process-cwd.js @@ -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;