Closed ianneub closed 12 years ago
It seems that when stubbing out a function that the notCalled property is not being set.
Please see the following:
module("Bug?"); test("testing notCalled", 3, function(){ this.stub(jQuery, "ajax"); ok(jQuery.ajax.notCalled); // fails with: failed sinon.assert.notCalled(jQuery.ajax); // success with: notCalled equal(jQuery.ajax.callCount, 0); // success with: okay, Expected: 0 });
Any thoughts?
Thanks!
sinon.assert.notCalled() works, spy.notCalled isn't really a feature at this point. It makes sense to have though, so I made an issue on the Sinon repo to add it: https://github.com/cjohansen/Sinon.JS/issues/74
sinon.assert.notCalled()
spy.notCalled
It seems that when stubbing out a function that the notCalled property is not being set.
Please see the following:
Any thoughts?
Thanks!