Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No stack trace on unit tests failure with node 21.0 and above #863

Open
jahow opened this issue Apr 23, 2024 · 0 comments
Open

No stack trace on unit tests failure with node 21.0 and above #863

jahow opened this issue Apr 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jahow
Copy link
Collaborator

jahow commented Apr 23, 2024

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:
image

Expected (obtained with node 20.10):
image

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.

@jahow jahow added the bug Something isn't working label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant