mirror of
https://github.com/denoland/deno.git
synced 2025-08-15 00:00:32 +00:00
avoid prototype builtin hasOwnProperty (#2144)
This commit is contained in:
parent
2be7e44403
commit
d0cd7a39a2
6 changed files with 74 additions and 7 deletions
|
@ -32,4 +32,22 @@ test(function blobSlice() {
|
|||
assertEquals(b4.size, blob.size);
|
||||
});
|
||||
|
||||
test(function blobShouldNotThrowError() {
|
||||
let hasThrown = false;
|
||||
|
||||
try {
|
||||
const options1: object = {
|
||||
ending: "utf8",
|
||||
hasOwnProperty: "hasOwnProperty"
|
||||
};
|
||||
const options2: object = Object.create(null);
|
||||
new Blob(["Hello World"], options1);
|
||||
new Blob(["Hello World"], options2);
|
||||
} catch {
|
||||
hasThrown = true;
|
||||
}
|
||||
|
||||
assertEquals(hasThrown, false);
|
||||
});
|
||||
|
||||
// TODO(qti3e) Test the stored data in a Blob after implementing FileReader API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue