Message to display on error.
Asserts that fn will throw an error.
Function that may throw.
Message to display on error.
Asserts that function will throw an error with message matching regexp.
Function that may throw.
Potential expected message match.
Asserts that function will throw an error that is an instance of constructor.
Function that may throw.
Potential expected error constructor.
Message to display on error.
Asserts that function will throw an error that is an instance of constructor and an error with message matching regexp.
Function that may throw.
Potential expected error constructor.
Asserts that the target is equal to expected, to within a +/- delta range.
Maximum differenced between values.
Message to display on error.
Asserts that a function changes the value of a property.
Function to run.
Container object.
Property of object expected to be modified.
Message 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.
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message to display on error.
Asserts that a function decreases an object property.
Function to run.
Container object.
Property of object expected to be decreased.
Message to display on error.
Asserts that actual is deeply equal to expected.
Actual value.
Potential expected value.
Message to display on error.
Asserts that haystack includes needle. Deep equality is used.
Container string.
Potential substring of haystack.
Message to display on error.
Asserts that haystack includes needle. Deep equality is used.
Container array, set or map.
Potential value contained in haystack.
Message to display on error.
Asserts that haystack does not includes needle.
Object.
Potential subset of the haystack's properties.
Message 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 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.
Message 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.
Object to test.
Property to test.
Value to test.
Message 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
Message 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.
Container object.
Potential contained property of object.
Message 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.
Container object.
Potential contained property of object.
Potential expected property value.
Message to display on error.
Alias to deepEqual
Actual value.
Potential expected value.
Message to display on error.
Asserts that a function does not change the value of a property.
Function to run.
Container object.
Property of object expected not to be modified.
Message to display on error.
Asserts that a function does not decrease an object property.
Function to run.
Container object.
Property of object expected not to be decreased.
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message to display on error.
Asserts that a function does not increase an object property.
Function to run.
Container object.
Property of object expected not to be increased.
Message to display on error.
Asserts that fn will not throw an error.
Function that may throw.
Message to display on error.
Asserts that function will throw an error with message matching regexp.
Function that may throw.
Potential expected message match.
Asserts that function will throw an error that is an instance of constructor.
Function that may throw.
Potential expected error constructor.
Message to display on error.
Asserts that function will throw an error that is an instance of constructor and an error with message matching regexp.
Function that may throw.
Potential expected error constructor.
Asserts non-strict equality (==) of actual and expected.
Actual value.
Potential expected value.
Message to display on error.
Compares byte arrays on per-element basis.
Actual byte buffer
Expected bytes encoded as a hex string or an array-like object
Error message conforming to Chai spec
Asserts that the target is neither null nor undefined.
Actual value.
Message to display on error.
Asserts that object is extensible (can have new properties added to it).
Actual value.
Message to display on error.
Throws a failure.
Message to display on error.
Throws a failure.
Actual value.
Potential expected value.
Message to display on error.
Comparison operator, if not strict equality.
Asserts that object is frozen (cannot have new properties added to it and its existing properties cannot be removed).
Actual value.
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message 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.
Object to test.
Keys to check
Message to display on error.
Asserts if value is not a false value, and throws if it is a true value.
Actual value.
Message to display on error.
Asserts that haystack includes needle.
Container string.
Potential substring of haystack.
Message to display on error.
Asserts that haystack includes needle.
Container array, set or map.
Potential value contained in haystack.
Message to display on error.
Asserts that haystack includes needle.
WeakSet container.
Potential value contained in haystack.
Message to display on error.
Asserts that haystack includes needle.
Object.
Potential subset of the haystack's properties.
Message to display on error.
Asserts that subset is included in superset using deep equality checking. Order is not take into account.
Actual set of values.
Potential contained set of values.
Message to display on error.
Asserts that subset is included in superset in the same order beginning with the first element in superset. Uses a deep equality check.
Actual set of values.
Potential contained set of values.
Message to display on error.
Asserts that subset is included in superset. Order is not take into account.
Actual set of values.
Potential contained set of values.
Message to display on error.
Asserts that subset is included in superset in the same order beginning with the first element in superset. Uses a strict equality check (===).
Actual set of values.
Potential contained set of values.
Message to display on error.
Asserts that a function increases an object property.
Function to run.
Container object.
Property of object expected to be increased.
Message to display on error.
Asserts that value is an instance of constructor.
Actual value.
Potential expected contructor of value.
Message to display on error.
Asserts valueToCheck is strictly greater than (>) valueToBeAbove.
Actual value.
Minimum Potential expected value.
Message to display on error.
Asserts that value is an array.
Actual value.
Message to display on error.
Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast.
Actual value.
Minimum Potential expected value.
Message to display on error.
Asserts valueToCheck is less than or equal to (<=) valueToBeAtMost.
Actual value.
Minimum Potential expected value.
Message to display on error.
Asserts valueToCheck is strictly less than (<) valueToBeBelow.
Actual value.
Minimum Potential expected value.
Message to display on error.
Asserts that value is a boolean.
Actual value.
Message to display on error.
Asserts that value is not undefined.
Actual value.
Message 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.
Actual value.
Message to display on error.
Asserts that object is extensible (can have new properties added to it).
Actual value.
Message to display on error.
Asserts that value is false.
Actual value.
Message to display on error.
Asserts that value is a finite number.
Unlike .isNumber
, this will fail for NaN
and Infinity
.
Actual value
Message to display on error.
Asserts that object is frozen (cannot have new properties added to it and its existing properties cannot be removed).
Actual value.
Message to display on error.
Asserts that value is a function.
Actual value.
Message to display on error.
Asserts that value is NaN.
Actual value.
Message to display on error.
Asserts that value is not an array.
Actual value.
Message to display on error.
Asserts that value is not a boolean.
Actual value.
Message 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.
Object to test.
Message to display on error.
Asserts that object is not extensible.
Actual value.
Message to display on error.
Asserts that value is not false.
Actual value.
Message to display on error.
Asserts that object is not frozen (cannot have new properties added to it and its existing properties cannot be removed).
Actual value.
Message to display on error.
Asserts that value is not a function.
Actual value.
Message to display on error.
Asserts that value is not NaN.
Actual value.
Message to display on error.
Asserts that value is not null.
Actual value.
Message to display on error.
Asserts that value is not a number.
Actual value.
Message to display on error.
Asserts that value is not an object of type 'Object' (as revealed by Object.prototype.toString).
Actual value.
Message to display on error.
Asserts that object is falsy.
Message to display on error.
Asserts that object is not sealed.
Actual value.
Message to display on error.
Asserts that value is not a string.
Actual value.
Message to display on error.
Asserts that value is not true.
Actual value.
Message to display on error.
Asserts that value is null.
Actual value.
Message to display on error.
Asserts that value is a number.
Actual value.
Message to display on error.
Asserts that value is an object of type 'Object' (as revealed by Object.prototype.toString).
Actual value.
Message to display on error.
Asserts that object is truthy.
Message to display on error.
Asserts that object is sealed (can have new properties added to it and its existing properties cannot be removed).
Actual value.
Message to display on error.
Asserts that value is a string.
Actual value.
Message to display on error.
Asserts that value is true.
Actual value.
Message to display on error.
Asserts that value is undefined.
Actual value.
Message to display on error.
Asserts that object has a length property with the expected value.
Container object.
Potential expected length of object.
Message to display on error.
Asserts that value matches the regular expression regexp.
Actual value.
Potential match of value.
Message 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.
Message 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.
Object to test.
Property to test.
Message 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 (===).
Object to test.
Property to test.
Value to test.
Message to display on error.
Asserts that actual is not deeply equal to expected.
Actual value.
Potential expected value.
Message to display on error.
Asserts that haystack does not includes needle. Deep equality is used.
Container string.
Potential substring of haystack.
Message to display on error.
Asserts that haystack does not includes needle. Deep equality is used.
Container array, set or map.
Potential value contained in haystack.
Message to display on error.
Asserts that haystack does not includes needle. Deep equality is used.
Object.
Potential subset of the haystack's properties.
Message 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 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.
Message 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.
Object to test.
Property to test.
Value to test.
Message 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.
Message 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.
Container object.
Potential contained property of object.
Message 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.
Container object.
Potential contained property of object.
Potential expected property value.
Message to display on error.
Asserts non-strict inequality (!=) of actual and expected.
Actual value.
Potential expected value.
Message to display on error.
Asserts that the target is either null or undefined.
Actual value.
Message to display on error.
Asserts that object is not extensible.
Actual value.
Message to display on error.
Asserts that object is not frozen (cannot have new properties added to it and its existing properties cannot be removed).
Actual value.
Message to display on error.
Asserts that haystack does not includes needle.
Container string.
Potential substring of haystack.
Message to display on error.
Asserts that haystack does not includes needle.
Container array, set or map.
Potential value contained in haystack.
Message to display on error.
Asserts that haystack does not includes needle.
WeakSet container.
Potential value contained in haystack.
Message to display on error.
Asserts that haystack does not includes needle.
Object.
Potential subset of the haystack's properties.
Message to display on error.
Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. Uses a deep equality check.
Actual set of values.
Potential contained set of values.
Message to display on error.
Asserts that subset isn’t included in superset in any order. Uses a strict equality check (===). Duplicates are ignored.
Actual set of values.
Potential not contained set of values.
Message to display on error.
Asserts that subset isn’t included in superset in the same order beginning with the first element in superset. Uses a strict equality check (===).
Actual set of values.
Potential contained set of values.
Message to display on error.
Asserts that value is not an instance of constructor.
Actual value.
Message to display on error.
Asserts that value does not match the regular expression regexp.
Potential match of value.
Message 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.
Message 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.
Object to test.
Property to test.
Message 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 (===).
Object to test.
Property to test.
Value to test.
Message to display on error.
Asserts that object is falsy.
Message 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.
Message to display on error.
Asserts that object has a property named by property.
Container object.
Potential contained property of object.
Message to display on error.
Asserts that object has a property named by property with value given by value.
Container object.
Potential contained property of object.
Potential expected property value.
Message to display on error.
Asserts that set1 and set2 don’t have the same members in the same order. Uses a deep equality check.
Actual set of values.
Potential expected set of values.
Message to display on error.
Asserts that set1 and set2 don’t have the same members in the same order. Uses a strict equality check (===).
Actual set of values.
Potential expected set of values.
Message to display on error.
Asserts that object is not sealed.
Actual value.
Message to display on error.
Asserts strict inequality (!==) of actual and expected.
Actual value.
Potential expected value.
Message to display on error.
Asserts that value's type is not name, as determined by Object.prototype.toString.
Actual value.
Potential expected type name of value.
Message to display on error.
Asserts that object is truthy.
Message to display on error.
Asserts that non-object, non-array value inList appears in the flat array list.
Value expected to be in the list.
List of values.
Message to display on error.
Compares two values using operator.
Left value during comparison.
Comparison operator.
Right value during comparison.
Message 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.
Message to display on error.
Asserts that object has a property named by property.
Container object.
Potential contained property of object.
Message to display on error.
Asserts that object has a property named by property with value given by value.
Container object.
Potential contained property of object.
Potential expected property value.
Message to display on error.
Asserts that set1 and set2 have the same members using deep equality checking. Order is not take into account.
Actual set of values.
Potential expected set of values.
Message to display on error.
Asserts that set1 and set2 have the same members in the same order. Uses a deep equality check.
Actual set of values.
Potential expected set of values.
Message to display on error.
Asserts that set1 and set2 have the same members. Order is not take into account.
Actual set of values.
Potential expected set of values.
Message to display on error.
Asserts that set1 and set2 have the same members in the same order. Uses a strict equality check (===).
Actual set of values.
Potential expected set of values.
Message to display on error.
Asserts that object is sealed (can have new properties added to it and its existing properties cannot be removed).
Actual value.
Message to display on error.
Asserts strict equality (===) of actual and expected.
Actual value.
Potential expected value.
Message to display on error.
Asserts that fn will throw an error.
Function that may throw.
Message to display on error.
Asserts that function will throw an error with message matching regexp.
Function that may throw.
Potential expected message match.
Asserts that function will throw an error that is an instance of constructor.
Function that may throw.
Potential expected error constructor.
Message to display on error.
Asserts that function will throw an error that is an instance of constructor and an error with message matching regexp.
Function that may throw.
Potential expected error constructor.
Asserts that fn will throw an error.
Function that may throw.
Message to display on error.
Asserts that function will throw an error with message matching regexp.
Function that may throw.
Potential expected message match or error constructor.
Message to display on error.
Asserts that function will throw an error that is an instance of constructor and an error with message matching regexp.
Function that may throw.
Potential expected error constructor.
Asserts that value's type is name, as determined by Object.prototype.toString.
Actual value.
Potential expected type name of value.
Message to display on error.
Expression to test for truthiness.