Gate: test-has-assertion
Every test asserts something in its body — the project says what an assertion is.
| Property | Value |
|---|---|
| Checker | test-has-assertion |
| Confronts | test |
| Blocking by default — new project | yes |
| Blocking by default — existing project | no — informs |
How it measures
Section titled “How it measures”A test that asserts nothing passes whatever the code does. It carries the scenario’s code, its title matches the scenario, the scenario counts as proved — and the body calls the code and checks nothing. Every gate that reads titles is green over it.
What an assertion looks like is the test library’s (expect(, t.Errorf, a project helper), so the
project declares it in dialect.tests.assertion, with a default for the families that have one.
Where a test’s body ends is the language’s too: a tests script that knows it says it (end), and
otherwise the body is read by its layout, which every language keeps whatever its syntax.
Declaring it
Section titled “Declaring it”gates: - name: test-has-assertion on: [test] check: test-has-assertion