Last time we presented you Wolkenkit for event sourcing. Now we’d like to share with you the information about the other cool tool. AVA is a test runner for Node! It is a test runner with a concise API, detailed error output, and process isolation that let you write tests more effectively.
What’s new & improved:
- The most exciting new feature is that you can pass an expectation object. The original behavior was both hard to explain and hard to express in Flow and TypeScript. Now, if you have a function that throws a synchronous error, use
- Assertion methods are now bound to the test, meaning you can provide them as direct arguments to other functions.
- As part of our Node.js 10 support, you can now use
t.snapshot(). Note that this is still a stage-3 proposal.
- AVA now uses Babel 7, with support for
- Hooks declared using
test.serialwill now execute serially. Only one of those hooks will run at a time.
- AVA now forwards arguments, provided after an
--argument terminator, to the worker processes. Arguments are available from
- You can now configure AVA through an
ava.config.jsfile. It must be placed next to the
package.json, and you mustn’t have any
"ava"options in the
Explore more code examples here.
Are you familiar with the main Node web frameworks for 2019?