Logo
Explore Help
Sign In
logos-storage/nim-websock
1
0
Fork 0
You've already forked nim-websock
mirror of https://github.com/logos-storage/nim-websock.git synced 2026-01-20 22:43:08 +00:00
Code Issues Packages Projects Releases Wiki Activity
nim-websock/tests/asyncunit.nim

24 lines
577 B
Nim
Raw Normal View History

Rework http (#38) * wip * wip * move http under ws folder * use asyctest * wip * wip * rework response sending * make example work with latest changes * wip request/response * misc * fix example to use new http layer * pass tls flags to client * more cleanup * unused imports * more unsused imports * better headers * add helpre sendError * export sendError * attach selected proto to session * move proto to session * handle unsupported version * fix tests * comment out for now * fix utf8 tests * allow tests to be ran in tls * misc * use Port type * add tls flags * better api * run tls tests * fix tests on windows * allow running tests with tls * mic * wip * fix autobahn ci * handle close * cleanup * logging and error handling * remove old stream
2021-05-31 20:39:14 -06:00
import unittest2
export unittest2 except suite, test
template suite*(name, body) =
suite name:
template setup(setupBody) {.used.} =
setup:
let asyncproc = proc {.async.} = setupBody
waitFor asyncproc()
template teardown(teardownBody) {.used.} =
teardown:
let asyncproc = proc {.async.} = teardownBody
waitFor asyncproc()
let suiteproc = proc = body # Avoids GcUnsafe2 warnings with chronos
suiteproc()
template test*(name, body) =
test name:
let asyncproc = proc {.async.} = body
waitFor asyncproc()
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 40ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API