balls
balls copied to clipboard
make expect work for compile-time if possible
import testes
func failcase(path: string): string {.compileTime.} =
raise newException(ValueError, "nope.")
suite "testes":
block:
expect ValueError:
failcase("some string")
Output:
⛔ expect ValueError:
⛔ failcase("some string"): compile failed
⛔ 🗏 7 expect ValueError:
⛔ 🗏 8 failcase("some string")
## 1 tests ⛔1