Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Methods

and

  • All matchers implement and and or. This allows to logically combine mutliple matchers. The result is a new matchers that requires both (and) or one of the matchers (or) to return true.

    example

    var stringOrNumber = sinon.match.string.or(sinon.match.number); var bookWithPages = sinon.match.instanceOf(Book).and(sinon.match.has("pages"));

    Parameters

    Returns SinonMatcher

contains

  • Requires a Map to contain each one of the items the given map has.

    Parameters

    Returns SinonMatcher

deepEquals

  • Requires a Map to be deep equal another one.

    Parameters

    Returns SinonMatcher

or

  • All matchers implement and and or. This allows to logically combine mutliple matchers. The result is a new matchers that requires both (and) or one of the matchers (or) to return true.

    example

    var stringOrNumber = sinon.match.string.or(sinon.match.number); var bookWithPages = sinon.match.instanceOf(Book).and(sinon.match.has("pages"));

    Parameters

    Returns SinonMatcher

test

  • test(val: any): boolean
  • Parameters

    • val: any

    Returns boolean