asynctest/tests/testAsyncTest.nim

22 lines
426 B
Nim
Raw Normal View History

2021-01-11 12:02:40 +01:00
import std/unittest
import std/asyncdispatch
import pkg/asynctest
proc someAsyncProc {.async.} =
# perform some async operations using await
discard
2021-01-11 12:02:40 +01:00
suite "test async proc":
2021-01-11 12:02:40 +01:00
asyncsetup:
# invoke await in the test setup:
await someAsyncProc()
2021-01-11 12:02:40 +01:00
asyncteardown:
# invoke await in the test teardown:
await someAsyncProc()
2021-01-11 12:02:40 +01:00
asynctest "async test":
# invoke await in tests:
await someAsyncProc()