Code extracted from sample videos from course "Learn Javascript Unit Testing With Mocha, Chai and Sinon": https://www.udemy.com/course/learn-javascript-unit-testing-with-mocha-chai-and-sinon/
Simple unit test using Mocha/Chai: "test/tests.js".
Function "Add" coded in "maths.js".
npm install chai mocha sinon
npm test
Expected:
Add tests
✔ should return 3 when called with 1 and 2
1 passing (5ms)