@rbxts/expect > Assertion > endsWith
Assertion.endsWith() method
Asserts that the array ends with the specified elements.
Signature:
endsWith(elements: InferArrayElement<T>[]): this;
Parameters
Parameter | Type | Description |
---|---|---|
elements | InferArrayElement<T>[] | Elements that the actual array should have at the ends. |
Returns:
this
This instance for chaining.
Remarks
Type alias for .
Example
expect([1,2,3]).to.be.an.array().that.endWith([2,3]);