Class jasmine.Matchers
Defined in: Matchers.js.
Constructor Attributes | Constructor Name and Description |
---|---|
jasmine.Matchers(env, actual, spec)
|
Method Attributes | Method Name and Description |
---|---|
<static> |
jasmine.Matchers.Any(expectedClass)
|
<static> |
jasmine.Matchers.matcherFn_(matcherName, matcherFunction)
|
message(expected)
|
|
<static> |
jasmine.Matchers.pp(str)
|
report(result, failing_message, details)
|
|
toBe(expected)
toBe: compares the actual to the expected using ===
|
|
Matcher that compares the actual to jasmine.undefined.
|
|
Matcher that boolean nots the actual.
|
|
toBeGreaterThan(expected)
|
|
toBeLessThan(expected)
|
|
toBeNull()
Matcher that compares the actual to null.
|
|
Matcher that boolean not-nots the actual.
|
|
Matcher that compares the actual to jasmine.undefined.
|
|
toContain(item)
Matcher that checks that the expected item is an element in the actual Array.
|
|
toEqual(expected)
toEqual: compares the actual to the expected using common sense equality.
|
|
toMatch(reg_exp)
Matcher that compares the actual to the expected using a regular expression.
|
|
toNotBe(expected)
toNotBe: compares the actual to the expected using !==
|
|
toNotContain(item)
Matcher that checks that the expected item is NOT an element in the actual Array.
|
|
toNotEqual(expected)
toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
|
|
toNotMatch(reg_exp)
Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
|
|
toThrow(expectedException)
Matcher that checks that the expected exception was thrown by the actual.
|
|
Matcher that checks to see if the actual, a Jasmine spy, was called.
|
|
Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
|
|
Matcher that checks to see if the actual, a Jasmine spy, was not called.
|
|
Class Detail
jasmine.Matchers(env, actual, spec)
- Parameters:
- {jasmine.Env} env
- actual
- {jasmine.Spec} spec
Method Detail
<static>
jasmine.Matchers.Any(expectedClass)
- Parameters:
- expectedClass
<static>
jasmine.Matchers.matcherFn_(matcherName, matcherFunction)
- Parameters:
- matcherName
- matcherFunction
message(expected)
- Parameters:
- expected
<static>
jasmine.Matchers.pp(str)
- Parameters:
- str
report(result, failing_message, details)
- Parameters:
- result
- failing_message
- details
toBe(expected)
toBe: compares the actual to the expected using ===
- Parameters:
- expected
toBeDefined()
Matcher that compares the actual to jasmine.undefined.
toBeFalsy()
Matcher that boolean nots the actual.
toBeGreaterThan(expected)
- Parameters:
- expected
toBeLessThan(expected)
- Parameters:
- expected
toBeNull()
Matcher that compares the actual to null.
toBeTruthy()
Matcher that boolean not-nots the actual.
toBeUndefined()
Matcher that compares the actual to jasmine.undefined.
toContain(item)
Matcher that checks that the expected item is an element in the actual Array.
- Parameters:
- {Object} item
toEqual(expected)
toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
- Parameters:
- expected
toMatch(reg_exp)
Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
a pattern or a String.
- Parameters:
- reg_exp
toNotBe(expected)
toNotBe: compares the actual to the expected using !==
- Parameters:
- expected
toNotContain(item)
Matcher that checks that the expected item is NOT an element in the actual Array.
- Parameters:
- {Object} item
toNotEqual(expected)
toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
- Parameters:
- expected
toNotMatch(reg_exp)
Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
- Parameters:
- reg_exp
toThrow(expectedException)
Matcher that checks that the expected exception was thrown by the actual.
- Parameters:
- {String} expectedException
wasCalled()
Matcher that checks to see if the actual, a Jasmine spy, was called.
wasCalledWith()
Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
wasNotCalled()
Matcher that checks to see if the actual, a Jasmine spy, was not called.
wasNotCalledWith()