2018-01-26 17:06:14 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2018-01-26 17:06:14 +00:00
|
|
|
*
|
|
|
|
* @format
|
|
|
|
* @emails oncall+react_native
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
jest.setMock('NativeModules', {
|
|
|
|
BlobModule: require('../__mocks__/BlobModule'),
|
|
|
|
});
|
|
|
|
|
|
|
|
var Blob = require('Blob');
|
|
|
|
var BlobManager = require('BlobManager');
|
|
|
|
|
|
|
|
describe('BlobManager', function() {
|
|
|
|
it('should create blob from parts', () => {
|
|
|
|
const blob = BlobManager.createFromParts([], {type: 'text/html'});
|
|
|
|
expect(blob).toBeInstanceOf(Blob);
|
|
|
|
expect(blob.type).toBe('text/html');
|
|
|
|
});
|
|
|
|
});
|