summaryrefslogtreecommitdiff
path: root/js/blob_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/blob_test.ts')
-rw-r--r--js/blob_test.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/blob_test.ts b/js/blob_test.ts
index 1e8ec8fbd..3c778a0e1 100644
--- a/js/blob_test.ts
+++ b/js/blob_test.ts
@@ -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.