uppy/packages/@uppy/utils/src/isPreviewSupported.test.js
Artur Paikin 5cfd5495ff thumbnail-generator: Add webp to the list of supported types (#1961)
* Add webp to the list of supported types

* add webp to tests too
2019-12-04 11:07:47 +01:00

11 lines
462 B
JavaScript

const isPreviewSupported = require('./isPreviewSupported')
describe('isPreviewSupported', () => {
it('should return true for any filetypes that browsers can preview', () => {
const supported = ['image/jpeg', 'image/gif', 'image/png', 'image/svg', 'image/svg+xml', 'image/bmp', 'image/jpg', 'image/webp']
supported.forEach(ext => {
expect(isPreviewSupported(ext)).toEqual(true)
})
expect(isPreviewSupported('foo')).toEqual(false)
})
})