Skip to content

Jest fails with "SyntaxError: Unexpected reserved word" everytime #256

@half-shell

Description

@half-shell

Hello,
I'm working with react-native and when I run the basic index.android.js test file, it systematically fails with the following:

SyntaxError: Unexpected reserved word
      
  at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)
  at Object.StackNavigator (node_modules/react-navigation/src/react-navigation.js:15:33)
  at Object.<anonymous> (src/appNavigator.js:13:37)

It looks like I'm doing something wrong, but I can't figure out what. I've tried fiddling around with it (mostly changing variables name), but I keep getting the same error.

The application works though, it doesn't show any error. It is the simpliest navigation app I could make, following the react-navigation doc, using redux.
I was wondering if this happened to anyone else, or if anyone has a clue of the dumb mistake I made.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions