Closed tqhoughton closed 1 week ago
Duplicate of #2549
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
Version
29.7.0
Steps to reproduce
Use the following jest.config.js:
Simply create the following test in your
node
env project:Both assertions will fail even though in NodeJS v20 LTS the condition (foo instanceof Error) will resolve to
true
Expected behavior
I expect AssertionErrors to extend the standard Error class as they do in the latest LTS version of NodeJS and pass
instanceof
checks.Actual behavior
AssertionErrors do not extend the base Error class in NodeJS when running in a jest context.
Additional context
No response
Environment