@rbxts/expect > Assertion > startWith
Assertion.startWith() method
Asserts that the actual value is a string that starts with the specified string.
Signature:
startWith(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.
Example
expect("Daymon").to.startWith("Day");