Skip to main content

@rbxts/expect > ExpectMessageBuilderOptions > attachFullOnCollapse

ExpectMessageBuilderOptions.attachFullOnCollapse property

Whether to automatically attach full versions of variables whenever they're collapsed.

Signature:

attachFullOnCollapse: boolean;

Remarks

If a VariableData is collapsed in the building of a message, its non collapsed version will be appended after the metadata under either Expected (full): or Actual (full):.

Useful for ensuring your primary failure message is short (and easy to read quickly), while retaining further details for debugging.

Example

With attachFullOnCollapse: false

Expected {...} to equal {...}

With attachFullOnCollapse: true

Expected {...} to equal {...}

Expected (full): '{ name: "Daymon", age: 5 }'
Actual (full): '{ name: "Daymon", age: 6 }'