Friday, 7 September 2018

Testing routes with Mocha

Hi, I am kind of new to mocha and testing overall. In my app i gave a for example a post route, that deletes a record from the DB. I want to perform a check whether this document has been successfully deleted. The problem is that i can't really export and reference this route this route (as you probably know it's a callback function). I was just wondering if i should write a function that deletes the document and then run it inside the route, or is there any way to do it. Thanks in advance ;)

Submitted September 07, 2018 at 03:21PM by everek123

No comments:

Post a Comment