Skip to content

Commit

Permalink
chore: made the Future.delayed more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Sep 13, 2023
1 parent 0506c77 commit f379e7c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void main() {
});

test('initializes _loggingConstraint from endpoint', () async {
await Future.delayed(const Duration(seconds: 3));
await Future<void>.delayed(const Duration(seconds: 3));

// Verify that _loggingConstraint exists
expect(
Expand All @@ -154,7 +154,7 @@ void main() {
when(() => mockFileStorage.loadConstraint(any()))
.thenAnswer((_) async => Future.value(null));

await Future.delayed(const Duration(seconds: 3));
await Future<void>.delayed(const Duration(seconds: 3));

// Verify that _loggingConstraint is set
expect(provider.loggingConstraint, equals(null));
Expand All @@ -171,7 +171,7 @@ void main() {
when(() => mockFileStorage.loadConstraint(any()))
.thenAnswer((_) async => Future.value(sampleJson));

await Future.delayed(const Duration(seconds: 3));
await Future<void>.delayed(const Duration(seconds: 3));

// Verify that _loggingConstraint uses local storage
expect(
Expand Down Expand Up @@ -208,7 +208,7 @@ void main() {
);
});

await Future.delayed(const Duration(seconds: 3));
await Future<void>.delayed(const Duration(seconds: 3));

// Verify that _loggingConstraint got updated
expect(
Expand Down

0 comments on commit f379e7c

Please sign in to comment.