32 lines
650 B
Nim
Raw Normal View History

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
setup:
# invoke await in the test setup:
await someAsyncProc()
2021-01-11 12:02:40 +01:00
teardown:
# invoke await in the test teardown:
await someAsyncProc()
2021-01-11 12:02:40 +01:00
test "async test":
# invoke await in tests:
await someAsyncProc()
suite "test async setupAll and teardownAll, allow multiple suites":
setupAll:
# invoke await in the test setup:
await someAsyncProc()
teardownAll:
# invoke await in the test teardown:
await someAsyncProc()
test "async test":
# invoke await in tests:
await someAsyncProc()