quickleft/test_track — Issue #5: sinon.js does affect pre-existing test suites
Author: jdelStrother
Created: 2011-10-14 18:16:34+00:00
State: open

Heya - just a heads up because I spent quite a while tracking down why a bunch of our tests stopped working when I started running them inside test_track. The sinon-qunit config has useFakeTimers: true, which means that tests along the lines of this -

asyncTest("timeout should something something", function(){
setTimeout(function(){
start();
ok(true, "Yay!");
}, 1);
});

will never complete, because setTimeout has been stubbed out by sinon.

I fixed it by setting sinon.config.useFakeTimers to false, but it might be worth mentioning something about that in the readme. (Personally, I'd be in favor of that being the default...)

That aside, thanks for the great library!