Home

Library goog.testing.asserts

Function Summary
callWithoutLogging(function (): undefined fn)

Runs a function in an environment where test failures are not logged. This is useful for testing test code, where failures can be a normal part of a test.

contains_(?goog.testing.asserts.ArrayLike container, <Any Type> contained) ⇒ boolean

Tells whether the array contains the given element.

findDifferences(<Any Type> expected, <Any Type> actual) ⇒ ?string

Determines if two items of any type match, and formulates an error message if not.

indexOf_(?goog.testing.asserts.ArrayLike container, <Any Type> contained) ⇒ number

Finds the position of the first occurrence of an element in a container.

isArrayIndexProp_(string prop) ⇒ boolean

Helper function for assertObjectEquals. Tells us if a given property name is an array index.

raiseException_(string comment, string= opt_message)

Raises a JsUnit exception with the given comment.

toArray_(?goog.testing.asserts.ArrayLike arrayLike) ⇒ !Array

Converts an array like object to array or clones it if it's already array.