feat: more implementation.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-07-28 21:07:02 +05:30
committed by xsahil03x
parent f246de55a1
commit e8de28854b
93 changed files with 883 additions and 843 deletions
@@ -25,13 +25,13 @@ void main() {
group('mimeType', () {
test('should return null if `String` is not a filename', () {
const fileName = 'not-a-file-name';
final mimeType = fileName.mimeType;
final mimeType = fileName.mediaType;
expect(mimeType, isNull);
});
test('should return mimeType if string is a filename', () {
const fileName = 'dummyFileName.jpeg';
final mimeType = fileName.mimeType;
final mimeType = fileName.mediaType;
expect(mimeType, isNotNull);
expect(mimeType!.type, 'image');
expect(mimeType.subtype, 'jpeg');
@@ -39,7 +39,7 @@ void main() {
test('should return `image/heic` if ends with `heic`', () {
const fileName = 'dummyFileName.heic';
final mimeType = fileName.mimeType;
final mimeType = fileName.mediaType;
expect(mimeType, isNotNull);
expect(mimeType!.type, 'image');
expect(mimeType.subtype, 'heic');