mirror of
https://github.com/foss42/apidash.git
synced 2025-05-22 08:46:33 +08:00
24 lines
539 B
Dart
24 lines
539 B
Dart
import 'package:test/test.dart';
|
|
import 'package:apidash/utils/file_utils.dart';
|
|
|
|
void main() {
|
|
group(
|
|
"Testing File Utils",
|
|
() {
|
|
test('Test getFileExtension', () {
|
|
String mimetype = "text/csv";
|
|
expect(getFileExtension(mimetype), "csv");
|
|
});
|
|
|
|
test('Test getShortPath', () {
|
|
String path = "A/B/C/D.csv";
|
|
expect(getShortPath(path), ".../C/D.csv");
|
|
});
|
|
|
|
test('Test getTempFileName', () {
|
|
expect(getTempFileName().length, greaterThan(0));
|
|
});
|
|
},
|
|
);
|
|
}
|