Open chintanp opened 4 years ago
@chintanp Im glad you like it and that's a good idea. It will probably be a few months before I have time to get to it.
@emangor Could you define what should be tested here? And some possible ways to go about it? One of the test I have so far is testing that the express server is up. Like so: https://glebbahmutov.com/blog/how-to-correctly-unit-test-express-server/ This tests that I get a status of 200 when the right path is sought and 404 for incorrect paths. I want to further test the controller, model and utils, but cannot find any examples. Any help is appreciated.
@chintanp Sorry for the delay, life got in the way with an international move and this whole pandemic thing. Testing can turn into something quite large, you have unit, functional and integration testing. IMO it's best to start with unit testing at the foundation.
@chintanp been awhile - I added unit testing to the TypeScript version of this boilerplate: https://github.com/emangor/boilerplate-typescript-express-postgres
@emangor this is a fine template that I am using. Wondering if there are any plans to add a test framework to the template.