JSPM

jasmine-object-containing

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q26521F
  • License MIT

A simple matcher that wraps jasmine.objectContaining

Package Exports

  • jasmine-object-containing

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jasmine-object-containing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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
});