Skip to content
Choose a tag to compare


@novemberborn novemberborn released this
Choose a tag to compare

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:


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


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:

Thanks again @qlonik!

Other changes

All changes



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.