Skip to content

test: add tests for jsonnet-tool, fix bugs in implementation

This adds tests for jsonnet-tool test, a testing tool for Jsonnet.

It also fixes issues with the existing implementation where invalid Jsonnet can result in the test returning with a zero exit code (and this not failing).

In order to build a proper test harness, some of the code needed to be refactored to make it testable.

The change also distinguishes between invalid tests and failing tests now.

Additionally, jsonnet-tool test will no longer display usage help text when an error is emitted from cobra CLI's RunE func.

Finally, some of the messages emitted from the console reporter have been made more consistent.

Edited by Andrew Newdigate

Merge request reports

Loading