Fix test cases

This commit is contained in:
Ming Ming 2024-05-07 23:12:52 +08:00
parent 528699d7c5
commit af3dd480d6
3 changed files with 6 additions and 5 deletions

View file

@ -173,7 +173,7 @@ Future<void> _getFileDescriptorsExtraShareFolder() async {
expect(
await src.getFileDescriptors(
account, file_util.unstripPath(account, "test2")),
[files[2].toDescriptor(), files[4].toDescriptor()],
[files[4].toDescriptor(), files[2].toDescriptor()],
);
}

View file

@ -7,8 +7,8 @@ import 'package:path/path.dart' as p;
import 'package:source_gen/source_gen.dart';
import 'package:test/test.dart';
void main() {
_resolveCompilationUnit("test/src/np_subject_accessor.dart");
Future<void> main() async {
await _resolveCompilationUnit("test/src/np_subject_accessor.dart");
tearDown(() {
// Increment this after each test so the next test has it's own package
_pkgCacheCount++;

View file

@ -1,4 +1,5 @@
import 'package:np_common/object_util.dart';
import 'package:np_datetime/np_datetime.dart';
import 'package:np_db_sqlite/src/database.dart';
import 'package:np_db_sqlite/src/database_extension.dart';
import 'package:test/test.dart';
@ -76,8 +77,8 @@ Future<void> _countFileGroupsByDate() async {
expect(
result.dateCount,
{
DateTime(2024, 1, 2): 2,
DateTime(2024, 1, 3): 1,
Date(2024, 1, 2): 2,
Date(2024, 1, 3): 1,
},
);
}