I am creating a unit test, this test consists of using the twitter API to obtain data of any profile (Name, number of tweets, followers, date of registration, etc). The point is that I'm using the Mocha library for this task, but I run into the problem, that when executing the assert, the twitter request takes more than 2 seconds (Mocha's default timeout), therefore my test always fails. Could someone give me a hand? What should I do, so that the comparison of the assert is executed after receiving all the data of the request to twitter?The repository where I have uploaded the code is the following: http://ift.tt/2ySPRy0
Submitted December 09, 2017 at 11:44AM by MagoMerlin
No comments:
Post a Comment