Skip to content

Commit

Permalink
test: fix invalid file: URL in test-fs-path-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Oct 18, 2024
1 parent f15213d commit 34bafc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-fs-path-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const tmpdir = require('../common/tmpdir');
const assert = require('assert');
const path = require('path');
const fs = require('fs');
const URL = require('url').URL;
const { pathToFileURL } = require('url');

tmpdir.refresh();

Expand All @@ -15,7 +15,7 @@ const nextFile = () => path.join(tmpdir.path, `file${fileCounter++}`);
const generateStringPath = (file, suffix = '') => file + suffix;

const generateURLPath = (file, suffix = '') =>
new URL('file://' + path.resolve(file) + suffix);
pathToFileURL(file + suffix);

const generateUint8ArrayPath = (file, suffix = '') =>
new Uint8Array(Buffer.from(file + suffix));
Expand Down

0 comments on commit 34bafc0

Please sign in to comment.