100% test coverage
anderseknert opened this issue · comments
While this is mostly an expensive waste of time in most languages, it's fairly easy to achieve 100% test coverage in Rego, and without ever having to test "impossible" conditions. The fact that we've never measured test coverage in Regal and despite that have one above 98% is some evidence of that.
go run main.go test --coverage bundle
...
"not_covered_lines": 78,
"coverage": 98.1994459833795
It would be a useful exercise to get that number to 100% to see if there is anything important we currently miss in our tests. Once we have 100% coverage, we should add a build step that enforces that going forward.
In order to see which lines aren't covered, just run go run main.go test --coverage bundle
and search the output for "not_covered".