Optionalmessage: MsgSourceMessage to display on error.
Asserts that the target is equal to expected, to within a +/- delta range.
Actual value
Potential expected value.
Maximum differenced between values.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function changes the value of a property.
T Type of object.
Function to run.
Container object.
Property of object expected to be modified.
Optionalmessage: MsgSourceMessage to display on error.
Optionalmessage: MsgSourceOptionalmessage: MsgSourceAsserts that a function changes the value of a property by an amount (delta).
function
or getter function
name optional
amount (delta)
Optionalmessage: MsgSourceoptional
Optionalmessage: MsgSourceAsserts that the target is equal to expected, to within a +/- delta range.
Actual value
Potential expected value.
Maximum differenced between values.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object contains all of the keys provided.
Since Sets and Maps can have objects as keys you can use this assertion to perform
a deep comparison.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has all of the keys provided but may have more keys not listed.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function decreases an object property.
T Type of object.
Function to run.
Container object.
Optionalproperty: stringProperty of object expected to be decreased.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)
T Type of object or function.
function
or getter function
name optional
amount (delta)
Optionalmessage: MsgSourceoptional
Optionalmessage: MsgSourceAsserts that a function decreases a numeric object property or a function's return value by an amount (delta)
T Type of object or function.
function
or getter function
name optional
amount (delta)
Optionalmessage: MsgSourceoptional
Optionalmessage: MsgSourceAsserts that haystack includes needle. Deep equality is used.
Container string.
Potential substring of haystack.
Optionalmessage: MsgSourceMessage to display on error.
Does not have any effect on string. Use Assert#include instead.
Asserts that haystack includes needle. Deep equality is used.
T Type of values in haystack.
Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while checking for deep equality
Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a property named by property with a value given by value. property can use dot- and bracket-notation for nested reference. Uses a deep equality check.
T Type of object.
Object to test.
Property to test.
Value to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties and checking for deep
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a property named by property, which can be a string using dot- and bracket-notation for deep reference.
T Type of object.
Container object.
Potential contained property of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a property named by property, which can be a string using dot- and bracket-notation for deep reference.
T Type of object. V Type of value.
Asserts that a function does not change the value of a property.
T Type of object.
Function to run.
Container object.
Property of object expected not to be modified.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function does not decrease an object property.
T Type of object.
Function to run.
Container object.
Optionalproperty: stringProperty of object expected not to be decreased.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)
T Type of object or function.
function
or getter function
name optional
amount (delta)
Optionalmessage: MsgSourceoptional
Optionalmessage: MsgSourceAsserts that object contains all of the keys provided.
Since Sets and Maps can have objects as keys you can use this assertion to perform
a deep comparison.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have at least one of the keys provided.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object contains all of the keys provided.
Since Sets and Maps can have objects as keys you can use this assertion to perform
a deep comparison.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has none of the keys provided.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function does not increase an object property.
T Type of object.
Function to run.
Container object.
Optionalproperty: stringProperty of object expected not to be increased.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will not throw an error.
Function that may throw.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalignored: anyIgnored parameter.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will not throw an error.
Function that may throw.
OptionalerrorLike: Error | ErrorConstructorExpected error constructor or error instance.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that the target does not contain any values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is extensible (can have new properties added to it).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is frozen (cannot have new properties added to it and its existing properties cannot be removed).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has all and only all of the keys provided.
Since Sets and Maps can have objects as keys you can use this assertion to perform
a deep comparison.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has all and only all of the keys provided.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has at least one of the keys provided.
Since Sets and Maps can have objects as keys you can use this assertion to perform
a deep comparison.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has at least one of the keys provided.
You can also provide a single object instead of a keys array and its keys
will be used as the expected set of keys.
T Type of object.
Object to test.
Keys to check
Optionalmessage: MsgSourceMessage to display on error.
Asserts if value is not a false value, and throws if it is a true value.
T Type of object.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that haystack includes needle.
Container string.
Potential substring of haystack.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that haystack includes needle.
T Type of values in haystack.
Asserts that subset is included in superset using deep equality checking. Order is not take into account.
T Type of set values.
Asserts that subset is included in superset in the same order beginning with the first element in superset. Uses a deep equality check.
T Type of set values.
Asserts that subset is included in superset in the same order beginning with the first element in superset. Uses a strict equality check (===).
T Type of set values.
Asserts that a function increases an object property.
T Type of object.
Function to run.
Container object.
Optionalproperty: stringProperty of object expected to be increased.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that a function does not increase a numeric object property or function's return value by an amount (delta).
T Type of object or function.
function
or getter function
name optional
amount (delta)
Optionalmessage: MsgSourceoptional
Optionalmessage: MsgSourceAsserts that a function increases a numeric object property or a function's return value by an amount (delta).
T Type of object or function.
function
or getter function
name optional
amount (delta)
Optionalmessage: MsgSourceoptional
Optionalmessage: MsgSourceAsserts that value is an instance of constructor.
T Expected type of value.
Actual value.
Potential expected contructor of value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is an array.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is a boolean.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is a callable function, which means that it is a function or an async function, GeneratorFunction, or async GeneratorFunction.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that the target does not contain any values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is extensible (can have new properties added to it).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is false.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is a finite number.
Unlike .isNumber, this will fail for NaN and Infinity.
T Type of value
Actual value
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is frozen (cannot have new properties added to it and its existing properties cannot be removed).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is a function.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is NaN.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not an array.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not a boolean.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not a callable function, which means that it is not a function or an async function, GeneratorFunction, or async GeneratorFunction.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that the target contains values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.
T Type of object.
Object to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is not extensible.
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is not frozen (cannot have new properties added to it and its existing properties cannot be removed).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not a function.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not NaN.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not a number.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not an object of type 'Object' (as revealed by Object.prototype.toString).
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is falsy.
T Type of object.
Object to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is not sealed.
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is not a string.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is null.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is a number.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is an object of type 'Object' (as revealed by Object.prototype.toString).
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is truthy.
Object to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is sealed (can have new properties added to it and its existing properties cannot be removed).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is a string.
T Type of value.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is true.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value is undefined.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a length property with the expected value.
T Type of object.
Container object.
Potential expected length of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value matches the regular expression regexp.
Actual value.
Potential match of value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object.
Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a direct or inherited property named by property, which can be a string using dot- and bracket-notation for nested reference.
T Type of object.
Object to test.
Property to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a property named by property with value given by value. property can use dot- and bracket-notation for nested reference. Uses a strict equality check (===).
T Type of object.
Object to test.
Property to test.
Value to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that haystack does not includes needle. Deep equality is used.
Container string.
Potential substring of haystack.
Optionalmessage: MsgSourceMessage to display on error.
Does not have any effect on string. Use Assert#notInclude instead.
Asserts that haystack does not includes needle. Deep equality is used.
T Type of values in haystack.
Asserts that haystack does not includes needle. Deep equality is used.
T Type of haystack.
Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object while checking for deep equality.
Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have a property named by property with value given by value. property can use dot- and bracket-notation for nested reference. Uses a deep equality check.
T Type of object.
Object to test.
Property to test.
Value to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties and checking for deep equality.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have a property named by property, which can be a string using dot- and bracket-notation for deep reference.
T Type of object.
Container object.
Potential contained property of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have a property named by property, which can be a string using dot- and bracket-notation for deep reference.
T Type of object. V Type of value.
Asserts that the target contains values. For arrays and strings, it checks the length property. For Map and Set instances, it checks the size property. For non-function objects, it gets the count of own enumerable string keys.
T Type of object.
Object to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that the target is either null or undefined.
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is not extensible.
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is not frozen (cannot have new properties added to it and its existing properties cannot be removed).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that haystack does not includes needle.
Container string.
Potential substring of haystack.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that haystack does not includes needle.
T Type of values in haystack.
Asserts that subset isn't included in superset in any order. Uses a
deep equality check. Duplicates are ignored.
assert.notIncludeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { f: 5 } ], 'not include deep members');
T Type of set values.
Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. Uses a deep equality check.
T Type of set values.
Asserts that subset isn’t included in superset in any order. Uses a strict equality check (===). Duplicates are ignored.
T Type of set values.
Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. Uses a strict equality check (===).
T Type of set values.
Asserts that value is not an instance of constructor.
T Type of value. U Type that value shouldn't be an instance of.
Actual value.
Potential expected contructor of value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value does not match the regular expression regexp.
Actual value.
Potential match of value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object.
Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. Enables the use of dot- and bracket-notation for referencing nested properties. ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have a property named by property, which can be a string using dot- and bracket-notation for nested reference. The property cannot exist on the object nor anywhere in its prototype chain.
T Type of object.
Object to test.
Property to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have a property named by property with value given by value. property can use dot- and bracket-notation for nested reference. Uses a strict equality check (===).
T Type of object.
Object to test.
Property to test.
Value to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is falsy.
T Type of object.
Object to test.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have it's own property named by property.
T Type of object.
Container object.
Potential contained property of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object does not have it's own property named by property with value given by value.
T Type of object. V Type of value.
Asserts that object has a property named by property.
T Type of object.
Container object.
Potential contained property of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a property named by property with value given by value.
T Type of object. V Type of value.
Asserts that object is not sealed.
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value's type is not name, as determined by Object.prototype.toString.
T Type of value.
Actual value.
Potential expected type name of value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object is truthy.
Object to test.
Optionalmessage: MsgSourceMessage to display on error.
Compares two values using operator.
Left value during comparison.
Comparison operator.
Right value during comparison.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has its own property named by property.
T Type of object.
Container object.
Potential contained property of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has it's own property named by property with value given by value.
T Type of object. V Type of value.
Asserts that object has a property named by property.
T Type of object.
Container object.
Potential contained property of object.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that object has a property named by property with value given by value.
T Type of object. V Type of value.
Asserts that set1 and set2 have the same members using deep equality checking. Order is not take into account.
T Type of set values.
Asserts that object is sealed (can have new properties added to it and its existing properties cannot be removed).
T Type of object
Actual value.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will throw an error.
Function that may throw.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalignored: anyIgnored parameter.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will throw an error.
Function that may throw.
OptionalerrorLike: Error | ErrorConstructorExpected error constructor or error instance.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will throw an error.
Function that may throw.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalignored: anyIgnored parameter.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will throw an error.
Function that may throw.
OptionalerrorLike: Error | ErrorConstructorExpected error constructor or error instance.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will throw an error.
Function that may throw.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalignored: anyIgnored parameter.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that fn will throw an error.
Function that may throw.
OptionalerrorLike: Error | ErrorConstructorExpected error constructor or error instance.
OptionalerrMsgMatcher: string | RegExpExpected error message matcher.
Optionalmessage: MsgSourceMessage to display on error.
Asserts that value's type is name, as determined by Object.prototype.toString.
T Type of value.
Actual value.
Potential expected type name of value.
Optionalmessage: MsgSourceMessage to display on error.
Expression to test for truthiness.