vitest icon indicating copy to clipboard operation
vitest copied to clipboard

Ability to filter the stack trace

Open aleclarson opened this issue 3 years ago • 0 comments

Clear and concise description of the problem

In some cases, stack traces contain a bunch of lines from third party packages, and I would prefer to omit those lines from the stack trace, as it's extremely unlikely that I need to be aware of them.

Suggested solution

Add an option like filterStack that takes a function that receives a file path and returns a boolean to indicate whether the stack frame should be removed from the trace. This is what I do in Saus (my Vite-based framework), and it works great.

Alternative

No response

Additional context

No response

Validations

aleclarson avatar Sep 07 '22 20:09 aleclarson