Skip to main content

@rbxts/expect > Placeholder > expected

Placeholder.expected property

The "expected" variable in an expect() statement.

Signature:

expected: ExpectedPlaceholder;

Remarks

This is usually the value passed into an assertion method, but not all methods end up having an expected value.

For example, the empty method doesn't have anything it's comparing the actual value to, so it doesn't have an "expected" value.

We refer to it as the "expected" variable, as it's usually what you're expecting the actual variable to be.

Note that you shouldn't use expected directly in your messages, instead you should use one of the properties of this type.