Module documentation for qunit/testrunner.js

Function Index

expect
Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
reset
Resets the test setup.
ok
Asserts true.
isSet
isObj
q
Returns an array of elements with the given IDs, eg.
t
url
equals
Checks that the first two arguments are equal, with an optional message.
triggerEvent
Trigger an event on an element.

Functions

expect

Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.

Params
asserts

reset

Resets the test setup. Useful for tests that modify the DOM.

ok

Asserts true.

Params
a
msg

isSet

Asserts that two arrays are the same

Params
a
b
msg

isObj

Asserts that two objects are equivalent

Params
a
b
msg

q

Returns an array of elements with the given IDs, eg.

t

Asserts that a select matches the given IDs

Params
a
b
c

url

Add random number to url to stop IE from caching

Params
value

equals

Checks that the first two arguments are equal, with an optional message. Prints out both expected and actual values on failure.

Prefered to ok( expected == actual, message )

Params
actual
expected
message

triggerEvent

Trigger an event on an element.

Params
elem
type
event