assert

Provides generic assertion methods.

Methods

equal(actual, expected, message)

Asserts that two values are equal.
Parameters:
Name Type Description
actual String Actual value.
expected String Expected value. Either a verbatim string or a regex string prefixed with 'regex:'.
message String optionalMessage to throw if assertion fails.

notEqual(actual, expected, message)

Asserts that two values are not equal.
Parameters:
Name Type Description
actual String Actual value.
expected String Expected value. Either a verbatim string or a regex string prefixed with 'regex:'.
message String optionalMessage to throw if assertion fails.

fail(message)

Fails test with the given message.
Parameters:
Name Type Description
message String optionalError message to return.