Automatic Unit Testing

Testing all your routes on the server with Mocha

How to Use

To Run Mocha Tests

$ npm test


Middleware Updates

Rails On Node by default tests all of the routes in routes.json which are your view routes with a 200 status code. Plus all of your routes in your API routes directory.

The tests will break when you add custom middleware. The tests by default, test 200 status codes on all routes. Update tests/index.js for your custom routes.

Custom Tests

Update your custom tests for in the custom directory for any mocha tests that you would like to add additionally.


Do not remove

All routes that you add to your views will be updated here. Do not remove this file.