Methods
equals(real, expected, message)
Checks if the expected equals the real value
Parameters:
Name | Type | Description |
---|---|---|
real |
any | The real returned value |
expected |
any | The expected return value |
message |
string | Message to throw if an error occurs |
- Source:
exists(value, message)
Fails if parameter doesn't exist.
Parameters:
Name | Type | Description |
---|---|---|
value |
any | The value to be inspected |
message |
string | Message to throw if an error occurs |
- Source:
fail(message)
Fails intentionally. Used inside test functions.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Message to throw with error |
- Source:
match(value, match, message)
Checks if a return matches `.match(x)`.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | The value to be tested |
match |
string | RegExp | The string or RegExp to be matched to |
message |
string | Message to throw if an error occurs |
- Source:
minicheck(tests)
Checks an object of tests. Main function.
Parameters:
Name | Type | Description |
---|---|---|
tests |
Object |
- Source: