diff --git a/test/fixtures/permission/fs-write.js b/test/fixtures/permission/fs-write.js index c2db94a545d364..40482c4bd375c3 100644 --- a/test/fixtures/permission/fs-write.js +++ b/test/fixtures/permission/fs-write.js @@ -11,7 +11,7 @@ const regularFolder = process.env.ALLOWEDFOLDER; const regularFile = process.env.ALLOWEDFILE; const blockedFolder = process.env.BLOCKEDFOLDER; const blockedFile = process.env.BLOCKEDFILE; -const blockedFileURL = new URL('file://' + process.env.BLOCKEDFILE); +const blockedFileURL = require('url').pathToFileURL(process.env.BLOCKEDFILE); const relativeProtectedFile = process.env.RELATIVEBLOCKEDFILE; const relativeProtectedFolder = process.env.RELATIVEBLOCKEDFOLDER; const absoluteProtectedFile = path.resolve(relativeProtectedFile);