mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-23 10:18:40 +00:00
11 lines
462 B
JavaScript
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)
|
|
})
|
|
})
|