Created
June 16, 2022 12:11
-
-
Save yongjhih/b345698d36c9b4d65abe549d16311711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("lazy", () async { | |
final now = DateTime.now(); | |
late final DateTime lazyNow = () { | |
return DateTime.now(); | |
}(); | |
await 2.seconds.delayed(); | |
expect(lazyNow.difference(now) > 2.seconds, isTrue); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment