You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting Error.stackTraceLimit = 0 in a custom error and throwing it inside a test, the time it takes for vitest to display the error is proportional to the size of the object passed (size of the message string).
In the example below, you can change the value of object size and see in the console that it takes more and more time to return. You can also comment the line Error.stackTraceLimit = 0 to see that the problem disappears.
On my machine, vitest just hangs after a certain size and I have to kill the process manually.
Note that I am using an external library that throws errors with a stackTraceLimit of 0, so I do not control this on my end.
Describe the bug
When setting
Error.stackTraceLimit = 0
in a custom error and throwing it inside a test, the time it takes for vitest to display the error is proportional to the size of the object passed (size of the message string).In the example below, you can change the value of object size and see in the console that it takes more and more time to return. You can also comment the line
Error.stackTraceLimit = 0
to see that the problem disappears.On my machine, vitest just hangs after a certain size and I have to kill the process manually.
Note that I am using an external library that throws errors with a stackTraceLimit of 0, so I do not control this on my end.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-edo7vt?file=test%2Fbasic.test.ts
System Info
from stackblitz:
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: