javascript - Making async calls inside Jasmine it() function -


i'm getting hard time trying figure out how can async call inside it function. tried this, fails.

var = 0; it("test async", function(done) {   settimeout(function() {     = 1;     done();   }, 1000);   expect(i).toequal(1);  // fails. 0 expected equal 1. }) 

it possible?


Comments

Popular posts from this blog

android - Automated my builds -

ruby on rails - Difference between "Redmine on Heroku" and "Installing Redmine" documentation -

c# - Create a custom control in Corel Draw X6 using only VSTA -