Skip to content
New issue

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

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

Already on GitHub? # to your account

Jest fails to run with SyntaxError: Unexpected token 'export' #23

Closed
SinanBaymammadli opened this issue Apr 11, 2024 · 0 comments · May be fixed by statsig-io/js-client#33
Closed

Jest fails to run with SyntaxError: Unexpected token 'export' #23

SinanBaymammadli opened this issue Apr 11, 2024 · 0 comments · May be fixed by statsig-io/js-client#33

Comments

@SinanBaymammadli
Copy link

SinanBaymammadli commented Apr 11, 2024

Describe the bug
When running unit tests with jest in a default next.js application tests fail with SyntaxError: Unexpected token 'export'

Your minimal, reproducible example
https://codesandbox.io/p/devbox/jest-statsig-vmkw4h

Steps to reproduce
on the terminal run npm run test

Expected behavior
Test should run without an error

This issue happens because of uuid dependency in statsig-js. It has been addressed in the latest version of uuid, so just updating that dependency to version 9 should be enough fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant