Class Index | File Index

Classes


Class jasmine.Matchers


Defined in: jasmine-0.10.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
jasmine.Matchers(env, actual, results)
Method Summary
Method Attributes Method Name and Description
 
toBe(expected)
Matcher that compares the actual to the expected using ===.
 
Matcher that compares the acutal to undefined.
 
Matcher that boolean nots the actual.
 
Matcher that compares the actual to null.
 
Matcher that boolean not-nots the actual.
 
toContain(item)
Matcher that checks that the expected item is an element in the actual Array.
 
toEqual(expected)
Matcher that 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)
Matcher that compares the actual to the expected using !==
 
Matcher that checks that the expected item is NOT an element in the actual Array.
 
toNotEqual(expected)
Matcher that 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 acutal, a Jasmine spy, was called.
 
Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
 
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
Method Detail
toBe(expected)
Matcher that compares the actual to the expected using ===.
Parameters:
expected

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.

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

toEqual(expected)
Matcher that 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)
Matcher that 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)
Matcher that 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 acutal, a Jasmine spy, was called.

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

					
					
					
						
						
						
						
						
						
						

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

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 27 2009 16:48:57 GMT-0700 (PDT)