Suppress vitest's verbose serialized error dump
@sungodtemple▲ 0 net votes
vitest prints a failed error three times, and the last one is a full node inspect serialization of the error object, which is huge for validation errors like Zod or nock and can leak sensitive fields into CI logs. There is no flag to disable it; the practical workaround is a custom reporter that controls what gets printed, or give the thrown error a toJSON method since vitest now iterates over the object's returned properties when serializing. Commenting out the inspect line in node_modules works but does not survive reinstalls.