Skip to content

Commit 744157d

Browse files
committed
test fix
1 parent 6a886df commit 744157d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/utils/file_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ String getShortPath(String path) {
4343
var f = p.split(path);
4444
if (f.length > 2) {
4545
f = f.sublist(f.length - 2);
46-
return ".../${p.joinAll(f)}";
46+
return p.join("...", p.joinAll(f));
4747
}
4848
return path;
4949
}

test/utils/file_utils_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:test/test.dart';
22
import 'package:apidash/utils/file_utils.dart';
3+
import 'package:path/path.dart' as p;
34

45
void main() {
56
group(
@@ -12,7 +13,7 @@ void main() {
1213

1314
test('Test getShortPath', () {
1415
String path = "A/B/C/D.csv";
15-
expect(getShortPath(path), ".../C/D.csv");
16+
expect(getShortPath(path), p.join("...", "C", "D.csv"));
1617
});
1718

1819
test('Test getTempFileName', () {

0 commit comments

Comments
 (0)