2
0
mirror of https://github.com/status-im/nim-libp2p.git synced 2025-02-28 12:30:46 +00:00
2024-06-13 09:07:36 +00:00

31 lines
484 B
Nim

import unittest2, chronos
export unittest2, chronos
template asyncTeardown*(body: untyped): untyped =
teardown:
waitFor(
(
proc() {.async.} =
body
)()
)
template asyncSetup*(body: untyped): untyped =
setup:
waitFor(
(
proc() {.async.} =
body
)()
)
template asyncTest*(name: string, body: untyped): untyped =
test name:
waitFor(
(
proc() {.async.} =
body
)()
)