diff --git a/test/parallel/test-fs-exists.js b/test/parallel/test-fs-exists.js index 071f85fc81e1c1..b19aa387741a70 100644 --- a/test/parallel/test-fs-exists.js +++ b/test/parallel/test-fs-exists.js @@ -23,6 +23,7 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); +const { URL } = require('url'); const f = __filename; fs.exists(f, common.mustCall(function(y) { @@ -33,5 +34,9 @@ fs.exists(`${f}-NO`, common.mustCall(function(y) { assert.strictEqual(y, false); })); +fs.exists(new URL('https://foo'), common.mustCall(function(y) { + assert.strictEqual(y, false); +})); + assert(fs.existsSync(f)); assert(!fs.existsSync(`${f}-NO`));