An Overview of JavaScript Testing in 2017
Vitali Zaidman
2.6K30

+1 on Cypress.io — but I’m biased because I work on it :)

A couple of other tools for testing: snap-shot is a tool that allows any framework to add snapshots, so if you use Mocha — no problem, have your snapshots with it. I also built on top of it schema-shot and subset-shot for particular use case scenarios.

There is an aspect of testing that you have not covered in your excellent overview: data-driven testing. Instead of manually providing many, many separate test cases, you can just give list of data and run code against the inputs, asserting only properties of the output. In snap-shot it works great to really minimize the amount of code needed to be written: https://github.com/bahmutov/snap-shot#data-driven-testing

And for other things: code coverage is good, but we could collect other coverage information, like data. Think, which values were passed to this function foo by all the tests; I implemented a tool https://github.com/bahmutov/data-cover for this.

Finally, since I love Mocha, I wrote a couple of tools on top that randomize unit test order (look up rocha) and run failing tests first (look up focha)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.