Closed winny- closed 1 year ago
gambiarra injects bindings into the lua testing function's environment (a requirement of this library is all test must be wrapped in a function). The bindings are ok
, spy
, eq
(code). This doesn't seem to play well with fennel because fennel's toolchain needs to track bindings across scope boundaries to emit closures correctly.
fennel-test assumes you're going to run tests against #!/usr/bin/env fennel
using a carefully written test runner script. So we'd have to adapt or rewrite it for love2d. It might become more costly to create a "fennel-test-love2d" library than to consider another framework.
This leaves luaunit. It sees technomancy has used this to much success (code).
Found yet another https://github.com/silentbicycle/lunatest . I think we should use luaunit so trying to integrate that at the moment.
we got testing :heavy_check_mark:
We should add unit testing for core game stuff. It could make it easier to make sweeping changes down the line. And validate our math.
Possible frameworks