Asserts that a value has a .length
property that is equal to the expected length.
method
test.MatchersBuiltin.toHaveLength
length: number
): void;
@param length
the expected length
expect([]).toHaveLength(0);
expect("hello").toHaveLength(4);
method
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);