Topics:
- Mocha
- Chai
- Sinon
- Assert
- Expect
- The objective is to get you exposed to using TDD with Mocha/Chai and Sinon.
- You will be writing tests for the code inside of
src/app.js
.
- cd into repo and run
npm install
- You'll notice we have two directories
src
andtest
. Inside ofsrc/app.js
you'll see all the code that we want to test, being exported out ofapp.js
in the bottom of the file. - Go ahead and run
npm test
and it will exectute the testing suites.
- Step 1: You have a broken test suite already, go ahead and change each test assertion such that it passes the expected test. Everything begins on line 14 inside of
tests/app.test.js
begin there.