I wanna do a TDD. However, I am going to write test on my controller function for my sails.js project
/*---------------------
:: Gamble
-> controller
---------------------*/
var GambleController = {
index: function(req, res) {
res.send('Hello World!');
}
};
module.exports = GambleController;
However , how can i write a test to test index function that output Hello world? Any one can give a example? Thanks