Skip to content

Test react native app V0.45.1 (or above) with JEST #15981

Closed
@b-asaf

Description

I am trying to test my react native application with JEST.
I am using:

dependencies:
  "react": "16.0.0-alpha.12",
  "react-native": "0.45.1",

devDependencies:
  "enzyme": "^2.9.1",
  "react-dom": "^15.6.1",
  "jest": "20.0.4",
  "react-test-renderer": "16.0.0-alpha.12",
  "save": ^2.3.1"

I wanted to add tests to my react native application without downgrade my react native version.
Actually, I am thinking about upgrading it before moving to production.

I keep getting the error:
react-dom is an implicit dependency in order to support react@0.13-14. Please add the appropriate version to your devDependencies. See https://github.com/airbnb/enzyme#installation

and most of the way to solve the problem was to downgrade my RN version, is there any other way?

I am using yarn (v1.0.2)
The application is aimed to Android and iOS phones.
I develop on Window and Mac.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions