Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest and Upgrading to 2.90 #7

Open
maitriyogin opened this issue Sep 11, 2018 · 1 comment
Open

Jest and Upgrading to 2.90 #7

maitriyogin opened this issue Sep 11, 2018 · 1 comment

Comments

@maitriyogin
Copy link

Hi,
I just updated expo to the latest 2.90, after running tests I get the following:

ReferenceError: self is not defined

      at node_modules/whatwg-fetch/dist/fetch.umd.js:8:40
      at Object.<anonymous>.support.searchParams (node_modules/whatwg-fetch/dist/fetch.umd.js:2:66)
      at Object.<anonymous> (node_modules/whatwg-fetch/dist/fetch.umd.js:5:2)
      at Object.<anonymous> (node_modules/jest-expo/src/setup.js:7:47)

This is definitely a problem with expo but was wondering if anyone else has experienced this?

package.json :

"devDependencies": {
    "@types/jest": "^23.1.0",
    "@types/react": "^16.3.17",
    "@types/react-native": "^0.55.19",
    "@types/react-native-vector-icons": "^4.6.1",
    "@types/react-test-renderer": "^16.0.1",
    "@types/expo": "^27.0.6",
    "@types/expo__vector-icons": "^6.2.2",
    "babel-jest": "^23.0.1",
    "jest-expo": "^29.0.0",
    "react-native-scripts": "1.14.0",
    "react-native-typescript-transformer": "1.2.10",
    "react-test-renderer": "16.4.1",
    "ts-jest": "^22.4.6",
    "tslint-config-prettier": "1.13.0",
    "typescript": "^2.9.2"
  },
  "dependencies": {
    "expo": "^29.0.0",
    "react": "16.4.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
    "react-native-vector-icons": "^4.6.0",
    "tslib": "^1.9.2"
  },
@maitriyogin
Copy link
Author

To get it to work I had to add the expo@28 version of whatwg-fetch as a dependency to get this to work ....

yarn add whatwg-fetch@1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant