jasmine-object-containing

0.0.2 • Public • Published

jasmine-object-containing

A simple matcher that wraps jasmine.objectContaining

Usage

In Node:

  var toContainObject = require('jasmine-object-containing').toContainObject;
 
  beforeEach(function () {
    this.addMatchers(toContainObject);
  });

In the browser:

  beforeEach(function () {
    this.addMatchers(toContainObject);
  });

Example

var obj = {
  foo: function () {},
  bar: 3,
  baz: 10
};
 
expect(obj).toContainObject({
  foo: jasmine.any(Function),
  bar: 3
});

/jasmine-object-containing/

    Package Sidebar

    Install

    npm i jasmine-object-containing

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • jgrund