okfn/ibp-explorer

Add testing framework

Closed this issue · 1 comments

Description

Tests are great! Front end developers have no excuse not to do them :).

Tasks

  • Get a basic setup with mocha and jsdom (we have used zombie, a jsdom wrapper/superset, in place of jsdom in the past, but it looks like it is not up-to-date with latest node, and jsdom actually exposes everything we need via a simple API anyway)
  • Add a tests directory and a test runner to package.json
  • Add some really simple tests: one test for each route, to check the route exists. that is it.

Here is a relevant blog post: http://robballou.com/2014/using-jsdom-and-mocha-for-testing/

Here is some related code from our other projects:

done