Generate a callback that will receive a completion callback and call it with the specified result after the specified delay
The result that the callback should pass to the completion callback
100
)
:
The delay in milliseconds that we should wait before calling the completion callback
Function
:
The callback that will provide the specified result
Checks to see if the actual result contains the expected result
The result data
The anticipated data
The name of the test
nothing
If the comparison failed, the failure will be thrown
Same as assert.deepEQual in that it performs a deep equals check, but if a failure occurs it will output detailed information
The result data
The anticipated data
The name of the test
nothing
If the comparison failed, the failure will be thrown
Return a highlighted comparison between the new data and the old data
string
:
The highlighted comparison
Return a highlighted comparison between the new data and the old data
string
:
The highlighted comparison
Same as assert.equal in that it performs a strict equals check, but if a failure occurs it will output detailed information
The result data
The anticipated data
The name of the test
nothing
If the comparison failed, the failure will be thrown
Checks to see if an error was as expected, if a failure occurs it will output detailed information
The result error
The anticipated error instance or message, can be null if you expect there to be no error
The name of the test
nothing
If the comparison failed, the failure will be thrown
Generate a callback that will check the error (if any) it receives for the expected error (if any), if a failure occurs it will output detailed information
The error instance or message string that we expected, passed as the second argument to errorEqual
The name of the test
An optional completion callback to call with the result of the compairson, if not specified and a failure occurs, the error will be thrown
Function
:
The callback that will check the error (if any) it receives for the expected error (if any)
Expect the passed function to throw the passed error (if any)
The function that we will call and expect to throw the passed error
The error instance or message string that we expected, passed as the second argument to errorEqual
The name of the test
nothing
Generate a callback that will check the arguments it received with the arguments specified, if a failure occurs it will output detailed information
The arguments that we expect the callback to receive when it is called
Function
:
The callback that will check the arguments it receives for the expected arguments
Return a stringified version of the value with indentation and colors where applicable
The value to inspect
{}
)
:
The options to pass to util.inspect
string
:
The inspected string of the value
Log the inspected values of each of the arguments to stdout
The arguments to inspect and log
nothing
Generate a callback that return an error instance with the specified message/error
'anerroroccured'
)
:
The error instance or message string that the callback will return
Function
:
The callback that will return the specified result
Generate a callback that will return the specified result
The result that the callback should return
Function
:
The callback that will return the specified result
Generate a callback that throw an error instance with the specified message/error
'anerroroccured'
)
:
The error instance or message string that the callback will throw
Function
:
The callback that will throw the specified error