Hey there!
I'm wondering how to stub/mock a helper method in functional tests? Thanks!
(And Yes, I already googled & used the search - but couldn't find any working solution, strange!?)
Hey there!
I'm wondering how to stub/mock a helper method in functional tests? Thanks!
(And Yes, I already googled & used the search - but couldn't find any working solution, strange!?)
Have you read the Mocha documentation, specifically the returns
method? You can tell Mocha what the mocked version of your method should send back, letting you set up both good and bad results, depending on what you're trying to test.