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

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

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

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.

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

Successfully merging a pull request may close this issue.

1 participant