This attribute retrieves an expectancy whose result value is false in case the matcher fulfills, and true otherwise.
Answer the given expectation as an instance of IArrayExpectation. No check is performed on the input to see if it can actually be casted.
Answer the given expectation as an instance of INumberExpectation. No check is performed on the input to see if it can actually be casted.
Answer the given expectation as an instance of IObjectExpectation. No check is performed on the input to see if it can actually be casted.
Answer the given expectation as an instance of IStringExpectation. No check is performed on the input to see if it can actually be casted.
Answers if the actual value is the same as expected, using strict compare. Do not use toBe with floating point numbers, use Expectations/Matchers.toBeCloseTo instead.
Answers if the actual value is defined (as in not equal to undefined
)
Answer if the actual element is empty.
Answers if the actual value is a falsy value.
Answer if the actual element is an instance of a given class (using instanceof).
Rest
Answers if the actual value is the same as expected, using a deep compare mechanism. Do not use toBeLike with floating point numbers, use Expectations/Matchers.toBeCloseTo instead.
Answers if the actual value is null
(strict null, not undefined).
Answers if the actual value is a truthy value.
Answers if the actual value is undefined
.
Answer if an object has at least all keys in the least. Combine with toHaveNoOtherThan to ensure exact key existence
Answer if an object has no other than the given keys (although not all given need to be present). Combine with toHaveAtLeast to ensure exact key existence
Answer if the actual element has a property with the given name.
Answer if the actual element has the given amount of properties.
Answer if the actual element has the given shape, as defined by the shapeOf submodule.
Answers if the actual value has a type matching the expected type, checked by using the typeof operator.
This interface represents an expectation that is performed over an object.