Asserts that a value has a .length
property that is equal to the expected length.
Symbol
MatchersBuiltin.toHaveLength
@param length
the expected length
expect([]).toHaveLength(0);
expect("hello").toHaveLength(4);
Symbol
Asserts that a value has a .length
property that is equal to the expected length.
the expected length
expect([]).toHaveLength(0);
expect("hello").toHaveLength(4);