Closed dominictarr closed 13 years ago
sometimes you don't need to check EVERYTHING about an object to know it's correct. especially when the object is likely to change or be added to.
for example, it would be great to be able to do this:
var mocked = nm.mock('foo').takes({atLeast: true, andThis: false}) mocked.foo({atLeast: true, andThis:false, ignoreThisExtraStuff: 'whatever'})
turns out nodemock already supported this, but in reverse. you could put extra properties in takes({}) and ignore them when the mock was called.
I've made tests to check for the correct behavior, and then fixed it.
turns out it was just a one line fix.
cheers. Dominic
Yes ill agree to your patch. I'll merge it. Need to run tests and verify. Thanks for your patch
sometimes you don't need to check EVERYTHING about an object to know it's correct. especially when the object is likely to change or be added to.
for example, it would be great to be able to do this:
turns out nodemock already supported this, but in reverse. you could put extra properties in takes({}) and ignore them when the mock was called.
I've made tests to check for the correct behavior, and then fixed it.
turns out it was just a one line fix.
cheers. Dominic