diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index f8fb94348d4d75..9f0a2415c49d92 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -562,7 +562,8 @@ if (common.isWindows) { '\\\\?\\' + process.cwd().toLowerCase() + '\\foo\\bar'); assert.equal(path.win32._makeLong('foo/bar').toLowerCase(), '\\\\?\\' + process.cwd().toLowerCase() + '\\foo\\bar'); - assert.equal(path.win32._makeLong('C:').toLowerCase(), + const currentDeviceLetter = path.parse(process.cwd()).root.substring(0, 2); + assert.equal(path.win32._makeLong(currentDeviceLetter).toLowerCase(), '\\\\?\\' + process.cwd().toLowerCase()); assert.equal(path.win32._makeLong('C').toLowerCase(), '\\\\?\\' + process.cwd().toLowerCase() + '\\c');