๐toHaveLength
Check the length of a value
This comparison verifies the length of a given object. This includes Array
, TypedArray
, ArrayBuffer
, and custom classes that have a length
property.
If this method is used with anything other than a reference type, it will result in a compile time error.
Note: ArrayBuffer
classes are tested using the byteLength
property.
This method is safe to use with jest
, with the exception of using ArrayBuffer
type references.
Last updated