diff --git a/lib/jsdom/living/file-api/File-impl.js b/lib/jsdom/living/file-api/File-impl.js index c33c08fed9..911faaf171 100644 --- a/lib/jsdom/living/file-api/File-impl.js +++ b/lib/jsdom/living/file-api/File-impl.js @@ -3,13 +3,10 @@ const BlobImpl = require("./Blob-impl").implementation; exports.implementation = class FileImpl extends BlobImpl { - constructor(globalObject, args, privateData) { - const fileBits = args[0]; - const fileName = args[1]; - const options = args[2]; + constructor(globalObject, [fileBits, fileName, options], privateData) { super(globalObject, [fileBits, options], privateData); - this.name = fileName.replace(/\//g, ":"); + this.name = fileName; this.lastModified = "lastModified" in options ? options.lastModified : Date.now(); } }; diff --git a/test/web-platform-tests/to-run.yaml b/test/web-platform-tests/to-run.yaml index 37196818c5..02b4356554 100644 --- a/test/web-platform-tests/to-run.yaml +++ b/test/web-platform-tests/to-run.yaml @@ -2,7 +2,7 @@ DIR: FileAPI FileReader/workers.html: [fail, Needs Worker implementation] blob/Blob-array-buffer.any.html: [fail, Depends on TextEncoder] -blob/Blob-constructor-endings.html: [fail, "- Blob is not a function +blob/Blob-constructor.any.html: [fail, "- Blob is not a function - a date is not instanceof Date - a regexp is not instanceof Regexp - strange v8 behaviour when error triggered in overridden array length