Skip to content

2.4.0

Compare
Choose a tag to compare
@novemberborn novemberborn released this 16 Sep 07:11
05f077e

Experimental t.try() assertions

Thanks to the amazing work and patience of @qlonik we're shipping a new assertion! t.try() lets you perform assertions and decide whether to commit or discard their outcome. All kinds of interesting things can be built on top of this, from fuzzy testers to new test interfaces and more.

We're excited to get this out there, but it's not quite done yet. For now you have to opt in to this new feature. Being opt-in, we may make changes (breaking ones even!) until we feel this is stable.

To opt in, configure AVA with the following:

package.json:

{
  "ava": {
    "nonSemVerExperiments": {
      "tryAssertion": true
    }
  }
}

ava.config.js:

export default {
	nonSemVerExperiments: {
		tryAssertion: true
	}
};

We'd love to hear your feedback. Please join us in this issue: #2250

Also, if you're looking to help out with the remaining issues so that we can ship this without the opt-in, have a look at this project: https://github.com/orgs/avajs/projects/1

Thanks again @qlonik!

Other changes

All changes

v2.3.0...v2.4.0

Thanks

Thank you @jeremenichelli, @jamesgeorge007, @dongjae93, @qlonik and @tryzniak. We couldn't have done this without you!

Get involved

We welcome new contributors. AVA is a friendly place to get started in open source. We have a great article on getting started contributing and a comprehensive contributing guide.