Skip to content

Commit

Permalink
Stop replacing / with : in the File constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Mar 7, 2021
1 parent ffd4aa3 commit 2ab99ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lib/jsdom/living/file-api/File-impl.js
Expand Up @@ -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();
}
};
2 changes: 1 addition & 1 deletion test/web-platform-tests/to-run.yaml
Expand Up @@ -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
Expand Down

0 comments on commit 2ab99ad

Please sign in to comment.