mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
19 lines
614 B
TypeScript
19 lines
614 B
TypeScript
import cleanupContentType from './cleanupContentType'
|
|
|
|
describe('getFileCompression', () => {
|
|
it('outputs known compression', async () => {
|
|
const compression = await cleanupContentType('application/zip')
|
|
expect(compression).toBe('zip')
|
|
})
|
|
|
|
it('outputs known x- compression', async () => {
|
|
const compression = await cleanupContentType('application/x-gtar')
|
|
expect(compression).toBe('gtar')
|
|
})
|
|
|
|
it('pass through unknown compression', async () => {
|
|
const compression = await cleanupContentType('blabla')
|
|
expect(compression).toBe('blabla')
|
|
})
|
|
})
|