mercredi 1 juillet 2015

sails js unit testing

I have creted a sails js application. I want to add unit testing for my application. I am using following approach to do the unit testing. http://ift.tt/1CIKZDS

I am using grunt to test my application with mocha. Now I need a way to override some sails methods (find, update, etc. ) to use for my testing, since I do not want interact with the database when testing the code. Is there a way override sails js methods. As an example when I use User.find method in my testing, I want to have a specific result to test my other methods work perfectly. Any kind of help would be appriciated.

Aucun commentaire:

Enregistrer un commentaire