mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
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:
@@ -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));
|
||||
}
|
||||
Reference in New Issue
Block a user