A simple matcher that wraps jasmine.objectContaining
In Node:
var toContainObject = require('jasmine-object-containing').toContainObject;
beforeEach(function () {
this.addMatchers(toContainObject);
});
In the browser:
beforeEach(function () {
this.addMatchers(toContainObject);
});
var obj = {
foo: function () {},
bar: 3,
baz: 10
};
expect(obj).toContainObject({
foo: jasmine.any(Function),
bar: 3
});