-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Problem
Our current unit testing framework is a bit crude and inconsistent. We use busted to test "pure Lua" features, such as vectors or serialization. But we can't test features that require the engine Lua environment, e.g. because they are implemented in C++, this way. So we have a unittests mod in devtest with a simple crude unittest framework.
Solutions
Somehow make busted available. This should be doable since busted and the luassert module are pure Lua. However I'm not sure whether the design of busted is suitable is for such an integration. The documentation certainly seems lacking. A quick test using require("busted.runner") (with disabled mod security) still had some major issues.
Alternatives
We could implement the most useful busted features - essentially describe, it and a few asserts - ourselves and expand our unittests framework to be effectively a simpler subset of busted. This might very well be the easier option than frankensteining in busted, and will probably be what I'll do for now.
Additional context
I'm currently working on #15985 and #7478 for which I need to write unit tests.