Skip to main content

@rbxts/expect > ActualPlaceholder > fullValue

ActualPlaceholder.fullValue property​

The "actual" value in an expect() statement, which is not collapsed.

Signature:

fullValue: string;

Remarks​

This is the "full" value of the actual variable.

It being full means that it does NOT respect the defined collapseLength.

If you do want it to respect the collapse length, then use value instead.

By default, most messages already have the attachFullOnCollapse setting enabled, so you don't usually have to attach this yourself.

Example​

For example, lets say we were checking if an object had any keys:

new ExpectMessageBuilder(
`Expected ${place.actual.value} to NOT have any keys`
).metadata({FullValue: place.actual.fullValue});

And the object was larger than our configured collapseLength, and ended up collapsed:

Expected '{...}' to NOT have any keys
FullValue: '{"name":"Daymon","age":24}'

This allows us to keep the main message short and easy to read, while still retaining the full value for debugging.