Description
Spurred by conversation in #2449 and #1485 we'd like for our assertions to return booleans. true
when they pass, false
when they fail. This does not apply to the throws()
and throwsAsync()
assertions.
Failing assertions will fail the test, but do not throw exceptions. This means your test does not stop executing. Usually that's fine, but there are conditions where you're about to do something that uses a lot of resources, and it's already unnecessary. Returning booleans will help with this.
The assertions are defined here:
Line 238 in 18aeac6
The type definition should be updated to reflect the new return type:
Line 41 in 18aeac6
Some tests should be added to (or existing test updated in) https://github.com/avajs/ava/blob/master/test-tap/assert.js.