There are two parts. First, when you try to set a timeout for a test, you do not call the method setTimeouton the desired object. This is due to the closure:
describe("flickrphotoSearch", function () {
it("should pass with correct inputs", function (done) {
flickrApplication.flickrPhotoSearch("hello", "flickr_user_Key", 1, handleData);
function handleData(photoUrl, done) {
this.setTimeout(1500);
assert.isString(photoUrl.toString(), 'not a string');
setTimeout(done, 1000);
};
});
handleData, this , , . this . jQuery Learning Center. , :
flickrApplication.flickrPhotoSearch("hello", "flickr_user_Key", 1, handleData.bind(this));
this.setTimeout(1500) handleData, .
, , 2000 , 1500 . , , API flickr.
, API flickr, unit test ( ).