Skip to content

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

@SinanBaymammadli

Description

@SinanBaymammadli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions