diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index 267b0ac14de3d0..b6859f79bc8403 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -561,7 +561,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');