Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Libraries/Blob/Blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Blob {
* Currently we only support creating Blobs from other Blobs.
* Reference: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
*/
constructor(parts: Array<Blob>, options: any) {
constructor(parts: Array<Blob> = [], options: any) {
const blobId = uuid();
let size = 0;
parts.forEach((part) => {
Expand Down
15 changes: 15 additions & 0 deletions Libraries/Blob/__tests__/Blob-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'use strict';


test('Blob construct', () => {
expect(() => new Blob()).not.toThrow();
});