This is an alternative output handler for Busted, a unit testing framework for Lua.
It is based on the json
output handler that is bundled with Busted.
It prints a JSON element per test instead of per suite, aka JSON Lines. Useful for:
- parsing busted output by stream
- running long suites on systems that timeout non verbose jobs after some minutes, like Travis CI.
- analyzing busted output with any tool that supports JSON Lines (VisiData).
luarocks install busted-jsonl
busted -o jsonl
or add a file .busted
to your project root containing
return {
default = {
output = "jsonl"
},
}
busted -o jsonl | jq
busted -o jsonl | vd -f jsonl
This is based off the code of json
from Busted, and like Busted, it is MIT-licensed.