Class Index | File Index

## Classes

- _global_
- jasmine
- jasmine.Block
- jasmine.Env
- jasmine.JsApiReporter
- jasmine.Matchers
- jasmine.MultiReporter
- jasmine.NestedResults
- jasmine.Reporter
- jasmine.Runner
- jasmine.Spec
- jasmine.Spy
- jasmine.Suite
- jasmine.util

# Class jasmine.Matchers

Defined in: jasmine-0.10.0.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| jasmine.Matchers(env, actual, results)

Field Summary
Field Attributes | Field Name and Description
--- | ---
| toBe toBe: compares the actual to the expected using ===
| toBeDefined Matcher that compares the acutal to undefined.
| toBeFalsy Matcher that boolean nots the actual.
| toBeNull Matcher that compares the actual to null.
| toBeTruthy Matcher that boolean not-nots the actual.
| toBeUndefined Matcher that compares the acutal to undefined.
| toContain Matcher that checks that the expected item is an element in the actual Array.
| toEqual toEqual: compares the actual to the expected using common sense equality.
| toMatch Matcher that compares the actual to the expected using a regular expression.
| toNotBe toNotBe: compares the actual to the expected using !==
| toNotContain Matcher that checks that the expected item is NOT an element in the actual Array.
| toNotEqual toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
| toNotMatch Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
| toThrow Matcher that checks that the expected exception was thrown by the actual.
| wasCalled Matcher that checks to see if the acutal, a Jasmine spy, was called.
| wasNotCalled Matcher that checks to see if the acutal, a Jasmine spy, was not called.

Class Detail
jasmine.Matchers(env, actual, results)

Parameters:
{jasmine.Env} env
actual
{jasmine.NestedResults} results

Field Detail
toBe
toBe: compares the actual to the expected using ===

toBeDefined
Matcher that compares the acutal to undefined.

toBeFalsy
Matcher that boolean nots the actual.

toBeNull
Matcher that compares the actual to null.

toBeTruthy
Matcher that boolean not-nots the actual.

toBeUndefined
Matcher that compares the acutal to undefined.

toContain
Matcher that checks that the expected item is an element in the actual Array.

toEqual
toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.

toMatch
Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes a pattern or a String.

toNotBe
toNotBe: compares the actual to the expected using !==

toNotContain
Matcher that checks that the expected item is NOT an element in the actual Array.

toNotEqual
toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual

toNotMatch
Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch

toThrow
Matcher that checks that the expected exception was thrown by the actual.

wasCalled
Matcher that checks to see if the acutal, a Jasmine spy, was called.

wasNotCalled
Matcher that checks to see if the acutal, a Jasmine spy, was not called.

Documentation generated by JsDoc Toolkit 2.1.0 on Sat Oct 31 2009 21:44:38 GMT-0700 (PDT)