|
@@ -32,6 +32,10 @@ describe('getFileType', () => {
|
|
|
name: 'bar.mkv',
|
|
|
data: 'sdfsfhfh329fhwihs',
|
|
|
}
|
|
|
+ const fileDicom = {
|
|
|
+ name: 'bar.dicom',
|
|
|
+ data: 'sdfsfhfh329fhwihs',
|
|
|
+ }
|
|
|
const toUpper = (file) => ({ ...file, name: file.name.toUpperCase() })
|
|
|
expect(getFileType(fileMP3)).toEqual('audio/mp3')
|
|
|
expect(getFileType(toUpper(fileMP3))).toEqual('audio/mp3')
|
|
@@ -39,6 +43,8 @@ describe('getFileType', () => {
|
|
|
expect(getFileType(toUpper(fileYAML))).toEqual('text/yaml')
|
|
|
expect(getFileType(fileMKV)).toEqual('video/x-matroska')
|
|
|
expect(getFileType(toUpper(fileMKV))).toEqual('video/x-matroska')
|
|
|
+ expect(getFileType(fileDicom)).toEqual('application/dicom')
|
|
|
+ expect(getFileType(toUpper(fileDicom))).toEqual('application/dicom')
|
|
|
})
|
|
|
|
|
|
it('should fail gracefully if unable to detect', () => {
|