Skip to main content

@rbxts/expect > Assertion > endsWith

Assertion.endsWith() method

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

Signature:

endsWith(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.

Remarks

Type alias for .

Example

expect("Daymon").to.be.a.string().that.endsWith("mon");