Oh the Testing You Can Do!
What’s the difference between Mocha and Chai? How about Mocha and Jasmine? Where does Instanbul come into play? The answer to these questions become pretty apparent if we look at the way writing tests are structured.
Assertion libraries are the tools that provide verification for your tests; they determine whether things are correct or not. Chai.js is a very popular assertion library in that it can be used with any testing framework and supports BDD/TDD styles of testing syntax. Interestingly, many testing frameworks provide built-in assertions which can get developers tripped-up at first. Jest is an example in that it’s a testing framework for React front-end code and it provides built-in describe assertions.