vitest icon indicating copy to clipboard operation
vitest copied to clipboard

fix: don't throw on null error, hide JSON results warning

Open sheremet-va opened this issue 3 years ago • 5 comments

We might corrupt JSON somehow, if user ends the process, so I think we should just skip it.

sheremet-va avatar Aug 30 '22 07:08 sheremet-va

I am not sure if I understand it, why do we need to limit the stacktrace?

antfu avatar Aug 30 '22 07:08 antfu

I am not sure if I understand it, why do we need to limit the stacktrace?

I left a comment explaining why. Vitest sets a limit to 100 by default, which is a lot for something we don't use internally. Building stack trace is a heavy operation in Node, as we saw in Vite for example.

sheremet-va avatar Aug 30 '22 07:08 sheremet-va

Vitest sets a limit to 100 by default

Should we low it down a bit and make it configurable?

antfu avatar Aug 30 '22 07:08 antfu

Vitest sets a limit to 100 by default

Should we low it down a bit and make it configurable?

User errors are always visible, so I don't think it's necessary. The problem is with internal usage of new Error for parsing stack trace.

sheremet-va avatar Aug 30 '22 08:08 sheremet-va

User errors are always visible, so I don't think it's necessary. The problem is with internal usage of new Error for parsing stack trace.

But I am not against making it configurable.

sheremet-va avatar Aug 30 '22 08:08 sheremet-va