The error tag to append to each error message.
Expect the object passed to be an array that contains a particular entry. Your compare method is invoked to determine if the entry you're looking for is found within the array.
the array to search
compare method (passed the parms) - return true if the entry is found within the array.
Expect a situation and transform the error (if expect fails). Accepts two methods of your implementation to: A) Test the expect (which is intended to throw an ImperativeError) B) Transform and return a new ImperativeError This allows you complete control over the contents of the error. If you are only interested in influencing the message displayed, then use the msg parm on each of the expect functions.
The method that contains your ImperativeExpect invocation
Passed the error thrown by the expect and expects you to return the ImperativeError you would like thrown.
Expect a set of keys (by name) to be defined, of type array, and optionally a non-zero length array.
the object for which you would like to assert that certain fields
if true, the length of the array must be non zero
keys in object that should be arrays
Expect a set of keys (by name) are defined.
object to test existence
keys in object
Expect that a set of keys are defined, of type string, and are non-blank (after trimming).
object to test existence
keys in object
Expect a set of keys to be of a certain type.
The input object
The type to check for (only primatives - uses "typeof")
A list of keys to check in the object
Expect a set of keys to be undefined.
object to test existence
keys in object
Check if the input object is an array.
The array to check
Expect that values are equal (via "!==" operator).
Value 1
Value 2
Check if the input is one of several possibilities in a list.
The value to find in following array
The array of possible items we could be expecting
Expect two values to be equal (via "===" operator).
Value 1
Value 2
Expect the object passed to be defined.
The object to check
Generated using TypeDoc
Helper class for paramter validation. Expectations that fail will throw an ImperativeError with a validation error message.
All methods allow keys to be specified as "property1.prop.lastprop" for example.