geonetwork-ui
geonetwork-ui copied to clipboard
No stack trace on unit tests failure with node 21.0 and above
Describe the bug
When a failure happens within a unit test (run with jest), no stack trace is present.
- GeoNetwork-UI version used:
main
- node version 21.0 and above
To reproduce:
- install node v21 (.g. with nvm)
- Create a test like so:
it('will fail', () => { throw new Error('blargz') })
- Set the test configuration in the IDE to use node 21
- Run the test in the IDE
Received:
Expected (obtained with node 20.10):
Potential solution
@rcaplier managed to fix the issue by using the jest-jasmine2 test runner. This looks like it was intended to ease the migration from jasmine to jest so I'm not 100% sure this is the right way to go.