Skip to content

Testing the backend and TDD

Cory Fauver edited this page Sep 11, 2015 · 3 revisions

I headed over to @MichaelGroneman's house to talk through this piece. Up until this point, I've mostly copied and pasted the tests that are within the codebase. I wanted each new component to have a spec file for when I was ready to start doing this myself.

The first lesson was to plow through some debugging and some syntax details. The backend uses Mocha for testing. We were held up for a while when we didn't realize that each before() and it() statement need to take a callback function done as a second argument and that done() needs to be called at the completion of the code within these blocks.

Clone this wiki locally