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.
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 instatsig-js
. It has been addressed in the latest version ofuuid
, so just updating that dependency to version 9 should be enough fix.