Post #3961016
2026-07-20 13:45 UTC
I'm still working out the API, but so far I have functions like "describe", "it", and "expect". Under the hood, "it" calls functions like "pass" or "fail" based on the outcome from "expect". "describe" groups tests together with a description and indents the terminal output.
Replies (1)
-
@paulshryock@phpc.social 2026-07-20 13:50
I've got a few global variables like PASSED, FAILED, and TOTAL, which begin at 0 and increment each time a test passes or fails. At the moment individual test files are "source"d in order to run in the same process and share global state. In the future, I'm sure it will make more sense to run test files in separate processes and quit sharing global state, but I'll take it one small step at a time, and work incrementally.