@rbxts/expect > Assertion > lengthOf
Assertion.lengthOf() method
Asserts that the value has a length of size
.
Signature:
lengthOf(size: number): this;
Parameters
Parameter | Type | Description |
---|---|---|
size | number |
Returns:
this
Remarks
Type alias for length.
Example
expect([1,2,3]).to.have.a.lengthOf(3);
expect({ name: "Daymon", age: 5 }).to.have.a.lengthOf(2);
expect("Daymon").to.have.a.lengthOf(6);