Skip to main content

@rbxts/expect > Assertion > endWith

Assertion.endWith() method

Asserts that the actual value is a string that ends with the specified string.

Signature:

endWith(str: string): Assertion<string>;

Parameters

Parameter

Type

Description

str

string

A string that should be at the end of the actual value.

Returns:

Assertion<string>

This instance for chaining.

Example

expect("Daymon").to.endWith("mon");