UNPKG

uppy

Version:

Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:

23 lines (18 loc) 795 B
'use strict'; var supportsMediaRecorder = require('./supportsMediaRecorder'); describe('supportsMediaRecorder', function () { it('should return true if MediaRecorder is supported', function () { global.MediaRecorder = function () {}; global.MediaRecorder.prototype.start = function () {}; expect(supportsMediaRecorder()).toEqual(true); }); it('should return false if MediaRecorder is not supported', function () { global.MediaRecorder = undefined; expect(supportsMediaRecorder()).toEqual(false); global.MediaRecorder = function () {}; expect(supportsMediaRecorder()).toEqual(false); global.MediaRecorder.prototype.foo = function () {}; expect(supportsMediaRecorder()).toEqual(false); }); }); //# sourceMappingURL=supportsMediaRecorder.test.js.map