javascript - Jasmine clock tick & Firefox: failing to trigger a Q.delay method -


lazy loading tests:

i trying build test jasmine test method uses q.delay. go around 10 seconds wait i'm using jasmine's clock:

jasmine.clock.tick(10010); 

this works on chrome not work on firefox. saw delay method of q utilized settimeout can't see reason different behaviors.

any ideas why fails on firefox?

with jasmine 2.0 , q @ v1 tag, i'm able run spec:

describe("testing", function() {   beforeeach(function() {     jasmine.clock().install();   });    aftereach(function() {     jasmine.clock().uninstall();   });    it("should work", function() {     var foo = null;     q.delay('hi', 10000).then(function(arg) {       foo = arg;     });     jasmine.clock().tick(10010);     expect(foo).toequal('hi');   }); }); 

with no problems in both chrome, firefox, , phantomjs. i'm not sure if because we've fixed issue in 2.0 or if have more complicated spec, i'm not replicating here.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -