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

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -