Tuesday 21 August 2018

Help with writing test cases for an Node/Express app

I would like to write some test cases for my project, riddler, which is a Slack app. I'm finding it hard to do so for a couple reasons:Slack encourages sending 200 status codes immediately after a request, thus, I'm not sure how to truly test my endpoints.My "business logic" ends with making a request to a specified url so again I don't know how to test if the response is correct.I feel like I need to make things more modular before being able to write tests; hopefully I can get some pointers where to start with that. The code is too long to post here, but there are only two files in question, which are:server.js: https://ift.tt/2Pt08Hq https://ift.tt/2wiNjGH help and suggestions would be greatly appreciated!

Submitted August 21, 2018 at 08:39PM by Cedricium

No comments:

Post a Comment