node

Testing Routes With Mocha and Chai

Testing Routes with Mocha and Chai While working on a restful api built with express I was trying to find an easy way to test my routes along with my unit tests using chai so I came up with a simple typescript class to fake http requests and responses so that I can verify that the request status and response body are set correctly and figured I’d share it here.

Continue reading