Skip to content

Don't expand large diffs by default #4385

@remorses

Description

@remorses

Clear and concise description of the problem

Calling toEqual on large objects generates a very large diff error difficult to understand and often cut by the max terminal output length, this can be prevented by passing expand: false to the diff function

Suggested solution

Pass expand: false for large objects and strings

Alternative

Add an expand option in the vitest configuration or always use expand false

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-haveNot breaking anything but nice to have (priority)

    Type

    No type

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions