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, (function (string, *, *): (null|string)=) opt_equalityPredicate) ⇒ ?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.
| `numberRoughEqualityPredicate_(number var1, number var2, number tolerance) ⇒ boolean` Compares equality of two numbers, allowing them to differ up to a given tolerance.
| `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.