Code coverage in 2 minutes with NYC

In my previous posts about testing, I don’t have a clear picture of how much of my code is protected with tests? NYC comes to help me know the real status of my testing. NYC is an npm package for getting stats about the test coverage working hand to hand with Mocha and the setup is so…

Testing promises with Mocha.

In my post about testing with Mocha, I forget a common task in every javascript developer, “the promises”, it is a common task for making our code run async, but how I can test it ?. Feel free to read the code on Github or continue reading. I will write a method that returns a promise and we will…

How to Test javascript from 0 to Mocha

I’m trying to learn to test in javascript, today we have few ways to test our code write plain test code or using mocha, jest or cypress. But what is a Test? the test is a piece of code that ensures our software works as we expect, it can be done without frameworks. Feel free…