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
import*aschaifrom'chai';conste=newError('hello');e.cause=e;chai.expect(e).to.equal(123);// Error: Maximum call stack size exceeded
For the context, we're thinking to expand on Error equality on Vitest vitest-dev/vitest#5876. Most of the logic is implemented on Vitest side, but we still use chai's assertion error message generation. While making test cases with cyclic references, I found that Error: Maximum call stack size exceeded is likely coming from chai as seen in the repro above.
The text was updated successfully, but these errors were encountered:
Fixeschaijs/chai#1645
We already handle circular references in objects, but do not do the same
for `Error` objects. This change adds the same `seen` logic to error
inspection as we have in object inspection.
* fix: handle circular refs in errors
Fixeschaijs/chai#1645
We already handle circular references in objects, but do not do the same
for `Error` objects. This change adds the same `seen` logic to error
inspection as we have in object inspection.
chai: 5.1.1
reproduction: https://stackblitz.com/edit/github-caqski-bm1zja?file=repro.mjs
For the context, we're thinking to expand on Error equality on Vitest vitest-dev/vitest#5876. Most of the logic is implemented on Vitest side, but we still use chai's assertion error message generation. While making test cases with cyclic references, I found that
Error: Maximum call stack size exceeded
is likely coming from chai as seen in the repro above.The text was updated successfully, but these errors were encountered: