[new feature] Uploader: support isImage flag (#4072)

This commit is contained in:
neverland
2019-08-08 20:28:55 +08:00
committed by GitHub
parent b004ae11c0
commit c012b29a20
3 changed files with 12 additions and 1 deletions

View File

@@ -10,5 +10,6 @@ test('isImageFile', () => {
expect(isImageFile({ file: { type: 'application/pdf' } })).toBeFalsy();
expect(isImageFile({ content: 'data:image/xxx' })).toBeTruthy();
expect(isImageFile({ content: 'data:application/xxx' })).toBeFalsy();
expect(isImageFile({ isImage: true })).toBeTruthy();
expect(isImageFile({})).toBeFalsy();
});