dennisjenkins75 / digiline_craftdb

Minetest mod for a digiline queryable database holding all regular and technic crafting recipes.
GNU General Public License v3.0
2 stars 2 forks source link

Convert unit tests from busted/luarocks to use 'mineunit'. #4

Open dennisjenkins75 opened 3 years ago

dennisjenkins75 commented 3 years ago

Per SX on Discord:

https://discord.com/channels/513329453741637637/809890578753650770/825866231835000892 https://discord.com/channels/513329453741637637/809890578753650770/826083288766218281

also still have not released "production" version so install command requires dev branch luarocks install --server=https://luarocks.org/dev --local mineunit

qos has some clean tests with mineunit, might be good to look at:

Tried this and yes some changes would be needed. tests -> spec is recommended (and maybe even required currently?) because mineunit uses only spec directory for tests and configurations by default.

Changes to test code are not that big, after renaming tests to spec:

After that luacheck however will complain about mineunit and sourcefile, no integration (yet) and so far I've simply added exclude_files = {"**/spec/**"} to .luacheckrc to not complain about test code at all. changed busted . to mineunit --coverage --quiet && mineunit --report