1

Currently i am working with Sails and Authy.js API to authenticate new users using authy.verify function. Most of my code is in the callback to create new users.

I am in process of write tests to test my endpoints. What would be the best way to mock authy.verify function so that i can test my code in the callback function ?

I have tried using sinon and testdouble but to no avail.

Any help would be appreciated. Thanks!

Aditya Patel
  • 569
  • 1
  • 10
  • 28
  • Can you share the code you have tried with sinon or testdouble? I'm sure one or the other should be able to help you. – philnash Nov 20 '16 at 15:22
  • Actually, I see [your other question](http://stackoverflow.com/questions/40541969/sinon-how-to-stub-authentication-library-authy-twilio) got a better answer, so I'd carry on down that route. – philnash Nov 20 '16 at 15:23

0 Answers0