Page MenuHomePhorge

file_type.spec.js
No OneTemporary

Size
629 B
Referenced Files
None
Subscribers
None

file_type.spec.js

import fileType from 'src/services/file_type/file_type.service.js'
describe('fileType service', () => {
describe('fileMatchesSomeType', () => {
it('should be true when file type is one of the listed', () => {
const file = { mimetype: 'audio/mpeg' }
const types = ['video', 'audio']
expect(fileType.fileMatchesSomeType(types, file)).to.eql(true)
})
it('should be false when files type is not included in type list', () => {
const file = { mimetype: 'audio/mpeg' }
const types = ['image', 'video']
expect(fileType.fileMatchesSomeType(types, file)).to.eql(false)
})
})
})

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 24, 4:24 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
93602
Default Alt Text
file_type.spec.js (629 B)

Event Timeline