@rbxts/expect > Assertion > startsWith
Assertion.startsWith() method
Asserts that the actual value is a string that starts with the specified string.
Signature:
startsWith(str: string): Assertion<string>;
Parameters
Parameter | Type | Description |
---|---|---|
str | string | A string that should be at the start of the actual value. |
Returns:
Assertion<string>
This instance for chaining.
Remarks
Type alias for .
Example
expect("Daymon").to.be.a.string().that.startsWith("Day");