joelgriffith / navalia

A bullet-proof, fast, and reliable headless browser API
https://joelgriffith.github.io/navalia/
GNU General Public License v3.0
957 stars 33 forks source link

Unable to run with Jest in create-react-app environment #75

Open SpencerGreene opened 6 years ago

SpencerGreene commented 6 years ago

The graphql version referenced by navalia@1.3.0 and the jest version referenced by create-react-app@1.1.1 seem to be incompatible with one another. Gives an error message:

 FAIL  src/react.spec.js
  ● Test suite failed to run

    /Users/sgreene/src/tutorials/test-navalia/node_modules/graphql/index.mjs:2
    export { graphql, graphqlSync } from './graphql';
    ^^^^^^

Steps to reproduce:

  1. Install create-react-app@1.1.1 (current stable version as of this writing)
  2. create-react-app test-navalia
  3. Create the app Login-Page.js and the first test react.spec.js from the blog post https://codeburst.io/composable-end-to-end-tests-for-react-apps-2ec82170af62.
  4. yarn test.

package.json looks like this:

{
  "name": "test-navalia",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-scripts": "1.1.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "navalia": "^1.3.0"
  }
}
WertiaCoffee commented 3 years ago

What's the point of this program