Monthly Archives: December 2016

Testing Mean.js Controllers – Part 2

You need to test that only authorized users can perform certain functions, to help prevent AshleyMadison-like embarrassments. Plus, doing so will boost your code coverage metrics by hitting all of those auth failure branches. For mean.js with passport, you normally … Continue reading

Posted in Software | Tagged , | Leave a comment

Testing Mean.js Controllers – Part 1

It’s time to test controllers. In this post, I’ll test a controller that returns a json response. Step 1 is to install node-mocks-http. Step 2 is to download jsdValidator. In our sample controller test file, include jsdValidator and create a schema. … Continue reading

Posted in Software | Tagged , | Leave a comment