Skip to content

Allow less verbose output #2976

@johtso

Description

@johtso

Clear and concise description of the problem

Currently, if a test fails, I see the error a total of 3 times, one time being a complete serialized representation of the error.

The most problematic of these is the serialized error.

In my use-case, I happen to be using Zod who's Error objects can be very large.

When every test run output ends with a serialized representation of a Zod error, I end up having to scroll up a page or more until I can see the normal vitest output.

This is what the output looks like for me:
Screenshot_2023-03-07 21 18 53_AUmwcy

Suggested solution

Would it make sense to have a flag making the output less noisy?

This seems to be the offending line:

logger.error(c.red(c.bold('Serialized Error:')), c.gray(propertiesString))

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Has plan

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions