test,benchmark: use tmpdir.fileURL()

PR-URL: https://github.com/nodejs/node/pull/49138
Refs: https://github.com/nodejs/node/pull/49040
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Livia Medeiros authored and Ulises Gascón committed 2023-09-10 18:07:39 +00:00
1 parent e391f4b197
commit fac56dbcc0
4 files changed
+3 -16

No files matched your search

-5
View File
@@ -23,11 +23,6 @@ const policyFilepath = tmpdir.resolve('policy');
const depFilepath = require.resolve(`./build/${common.buildType}/binding.node`);
const depURL = pathToFileURL(depFilepath);
const tmpdirURL = pathToFileURL(tmpdir.path);
if (!tmpdirURL.pathname.endsWith('/')) {
tmpdirURL.pathname += '/';
}
const depBody = fs.readFileSync(depURL);
function writePolicy(...resources) {
const manifest = { resources: {} };