cjohansen/Sinon.JS — pull request #106 by mantoni (2012-03-24 18:14:27+00:00)
Title: has and hasOwn matchers

A small addition to the new matchers.

- `sinon.match.has(property)` requires the value to be an object and have the given property defined.
- `sinon.match.has(property, expectation)` additionally compares with the given expectation. Can be another matcher.
- `sinon.match.hasOwn(property)` requires the value to be an object and have the given _own_ property defined.
- `sinon.match.hasOwn(property, expectation)` well ...

I think this is particularly useful if testing APIs with config objects or large JSON messages.