refactor: test organisation and service test (#27991)

* refactor: test organisation

# Conflicts:
#	mobile/test/unit/utils/editor_test.dart

* regroup hash_service_test

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-04-21 03:15:20 +05:30
committed by GitHub
parent f909648bce
commit d9011c0829
15 changed files with 309 additions and 219 deletions
+10
View File
@@ -0,0 +1,10 @@
import 'package:uuid/uuid.dart';
class TestUtils {
static String uuid([String? id]) => id ?? const Uuid().v4();
static DateTime date([DateTime? date]) => date ?? DateTime.now();
static DateTime now() => DateTime.now();
static DateTime yesterday() => DateTime.now().subtract(const Duration(days: 1));
static DateTime tomorrow() => DateTime.now().add(const Duration(days: 1));
}