Add testing framework
Closed this issue · 1 comments
pwalsh commented
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 topackage.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:
- https://github.com/frictionlessdata/data-quality-dashboard/blob/master/tests/index.js
- https://github.com/frictionlessdata/data-quality-dashboard/blob/master/package.json#L8
- https://github.com/frictionlessdata/jsontableschema-js/tree/master/test
- https://github.com/openspending/os-admin/tree/master/tests
- https://github.com/openspending/os-viewer/tree/master/tests
- https://github.com/openspending/os-packager/tree/master/tests
pwalsh commented
done