tj / should.js

BDD style assertions for node.js -- test framework agnostic
MIT License
2.75k stars 194 forks source link

Should node be called #90

Closed wdavidw closed 11 years ago

wdavidw commented 11 years ago

Hi & thanks for your nice module Would be nice to validate some code isn't executed, something as should.not.be.called, What do you think ?

tj commented 11 years ago

im not a fan of "spies" personally, I dont think they really test anything significant, but I would just do foo.bar = function(){ assert(0 && "should not be called") }

wdavidw commented 11 years ago

Neither am I, but I just face a situation where that would have detected a bug. Thanks for answering so promptly, do you want me to prepare a pull request ?

btd commented 11 years ago

It is things for sinon.js. If it is required, better to write some plugin, but do not include all things in should.js