mirror of
https://github.com/logos-storage/asynctest.git
synced 2026-01-02 13:03:07 +00:00
Fix: ensure that eventually works when std/times is imported
This commit is contained in:
parent
98f99df4b4
commit
3313b54fc0
@ -1,6 +1,7 @@
|
||||
import pkg/chronos
|
||||
|
||||
template eventually*(expression: untyped, timeout=5000): bool =
|
||||
bind Moment, now, milliseconds
|
||||
|
||||
proc eventually: Future[bool] {.async.} =
|
||||
let endTime = Moment.now() + timeout.milliseconds
|
||||
|
||||
@ -2,3 +2,10 @@ import pkg/asynctest/chronos/unittest
|
||||
|
||||
include ../common/testbody
|
||||
include ../common/testfail
|
||||
|
||||
import std/times
|
||||
|
||||
suite "eventually and std/times":
|
||||
|
||||
test "compiles when both chronos and std/times are imported":
|
||||
check eventually true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user