Skip to main content

@rbxts/expect > ExpectMessageBuilder > actual

ExpectMessageBuilder.actual() method

Overwrites all the values for the actual variable.

Signature:

actual(data: VariableData): this;

Parameters

Parameter

Type

Description

data

VariableData

A VariableData containing the and value of the actual variable.

Returns:

this

This instance, for chaining.

Remarks

Instead of calling actualValue and actualType separately, you can call this method to set them both at once.

Example

const customEqual: CustomMethodImpl<defined> = (
_,
actual: defined,
expected: defined
) => {
const message = baseMessage.use().actual({
value: actual,
type: typeOf(actual)
});

// ...
};