Skip to content

SyntaxError: Identifier 'jest' has already been declared #1319

Closed
@cnolimit

Description

@cnolimit

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Can you reproduce the problem with latest npm?

Yes after updating to the latest version the issue still occurs

###Can you still reproduce it?

Yes issue still occurs

Description

An issue with running test using jest v18.0.0

Expected behavior

The declared variable within the test.js file would be the first instance, or the jest global variable to be available within the test.js

Actual behavior

Error is logged, stating that jest has already been declared
Screen Shot 2016-12-24 at 20.47.24.png

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
  2. node -v7.3.0:
  3. npm -3.10.10:

Then, specify:

  1. Operating system: macOs Sierra
  2. Browser and version: Chrome Version 55.0.2883.95 (64-bit)

Reproducible Demo

To re-create the issue;

  • run create-react-app
  • npm run eject
  • update jest version to 18.0.0
  • npm run test

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