Class Index | File Index

Classes


Class jasmine.Matchers


Defined in: Matchers.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
jasmine.Matchers(env, actual, spec, opt_isNot)
Method Summary
Method Attributes Method Name and Description
<static>  
jasmine.Matchers.Any(expectedClass)
<static>  
jasmine.Matchers.matcherFn_(matcherName, matcherFunction)
 
<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)
 
Matcher that compares the actual to null.
 
Matcher that boolean not-nots the actual.
 
Matcher that compares the actual to jasmine.undefined.
 
toContain(expected)
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.
 
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.
 
toMatch(expected)
Matcher that compares the actual to the expected using a regular expression.
 
toNotBe(expected)
toNotBe: compares the actual to the expected using !==
 
toNotContain(expected)
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(expected)
Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
 
toThrow(expected)
Matcher that checks that the expected exception was thrown by the actual.
 
 
 
Matcher that checks to see if the actual, a Jasmine spy, was not called.
 
<static>  
jasmine.Matchers.wrapInto_(prototype, matchersClass)
Class Detail
jasmine.Matchers(env, actual, spec, opt_isNot)
Parameters:
{jasmine.Env} env
actual
{jasmine.Spec} spec
opt_isNot
Method Detail
<static> jasmine.Matchers.Any(expectedClass)
Parameters:
expectedClass

<static> jasmine.Matchers.matcherFn_(matcherName, matcherFunction)
Parameters:
matcherName
matcherFunction

message()

<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(expected)
Matcher that checks that the expected item is an element in the actual Array.
Parameters:
{Object} expected

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

toHaveBeenCalled()
Matcher that checks to see if the actual, a Jasmine spy, was called.

toHaveBeenCalledWith()
Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.

					
					
					
						
						
						
						
						
						
						

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

toNotBe(expected)
toNotBe: compares the actual to the expected using !==
Parameters:
expected

toNotContain(expected)
Matcher that checks that the expected item is NOT an element in the actual Array.
Parameters:
{Object} expected

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

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

toThrow(expected)
Matcher that checks that the expected exception was thrown by the actual.
Parameters:
{String} expected

wasCalled()
Deprecated:
Use expect(xxx).toHaveBeenCalled() instead

wasCalledWith()
Deprecated:
Use expect(xxx).toHaveBeenCalledWith() instead

wasNotCalled()
Matcher that checks to see if the actual, a Jasmine spy, was not called.
Deprecated:
Use expect(xxx).not.toHaveBeenCalled() instead

wasNotCalledWith()
Deprecated:
Use expect(xxx).not.toHaveBeenCalledWith() instead

<static> jasmine.Matchers.wrapInto_(prototype, matchersClass)
Parameters:
prototype
matchersClass

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:43 GMT-0700 (PDT)