AVA is a test runner for Node

AVA is a test runner for Node
Average rating: 0
(0 votes)

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 t.throws() (or t.notThrows()).
  • 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 BigInt values in t.deepEqual() and t.snapshot(). Note that this is still a stage-3 proposal.
  • AVA now uses Babel 7, with support for babel.config.js files.
  • Hooks declared using test.serial will 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 process.argvonwards.
  • You can now configure AVA through an ava.config.js file. It must be placed next to the package.json, and you mustn’t have any "ava" options in the package.json file.

Explore more code examples here.

Are you familiar with the main Node web frameworks for 2019?

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Phone (+1) 9035021111