Skip to content

eskerda/busted-jsonl

Repository files navigation

busted-jsonl

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).

Installing

luarocks install busted-jsonl

Using

busted -o jsonl

or add a file .busted to your project root containing

return {
   default = {
      output = "jsonl"
   },
}

Example

busted -o jsonl | jq
busted -o jsonl | vd -f jsonl

License

This is based off the code of json from Busted, and like Busted, it is MIT-licensed.

About

A JSON Lines output handler for Busted

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages