Presubmit.Assertions.ExUnit (presubmit v0.2.2)

Copy Markdown View Source

Assertions over test coverage of a change, built on Presubmit.Adapters.ExUnitCase.

Summary

Functions

Asserts that when the commit changes behaviour in lib/ (function bodies, additions, removals — not docs or formatting), it also changes a test.

Asserts every module the commit adds under lib/ has a test module in the resulting tree: one named <Module>Test, or one that references the module.

Functions

assert_behaviour_changes_tested(commit)

@spec assert_behaviour_changes_tested(Presubmit.Commit.t()) :: :ok

Asserts that when the commit changes behaviour in lib/ (function bodies, additions, removals — not docs or formatting), it also changes a test.

assert_tested(commit)

@spec assert_tested(Presubmit.Commit.t()) :: :ok

Asserts every module the commit adds under lib/ has a test module in the resulting tree: one named <Module>Test, or one that references the module.