Mocha, Chai, & BCrypt
Testing BCrypt on Node.js with Mocha + Chai.
Getting Started
- Clone this repository.
npm install
to acquire the modules required for this project.- Run
mocha
. Watch the tests work.
What's going on with this BDD stuff?
- Behavior driven development starts off with us placing tests are placed inside of a
test/
folder. - Functionality is then then described with a series of tests.
- Each test (it) then can expect or describe what a value should be.
Challenge
- Read Chai's BDD Docs: http://chaijs.com/api/bdd/
- Inspect
test/test.js
- Modify each test to make them fail.
- Correct them to make them pass again!
- After inspecting the initial tests inside of the
test/test.js
folder and getting them to work, uncomment out the starter code at the end of the file and re-test BCrypt by hand.