mirror of
https://github.com/transloadit/uppy.git
synced 2026-08-02 14:52:24 +00:00
And rewrite all the require calls. ```bash git mv src/utils/* packages/@uppy/utils/src sed -i 's/[./]*\/utils\//@uppy\/utils\/lib\//' src/**/*.js # transform (../)*utils → @uppy/utils ```
11 lines
435 B
JavaScript
11 lines
435 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']
|
|
supported.forEach(ext => {
|
|
expect(isPreviewSupported(ext)).toEqual(true)
|
|
})
|
|
expect(isPreviewSupported('foo')).toEqual(false)
|
|
})
|
|
})
|