运行jest测试会导致TypeError:babelHelpers.typeof不是函数

时间:2016-07-22 13:02:11

标签: react-native jestjs

标题显示我在反应原生中遇到了问题。

TypeError: babelHelpers.typeof is not a function

我知道这不是一个新错误。我看到了:

New react-native app has 'TypeError: babelHelpers.typeof is not a function' [iOS]

https://github.com/facebook/react-native/issues/4844#issuecomment-204035720

我几乎完成了所说的一切。

package.json
{
  "name": "Something",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "jest": {
    "scriptPreprocessor": "node_modules/react-native/jestSupport/preprocessor.js",
    "setupEnvScriptFile": "node_modules/react-native/jestSupport/env.js",
    "testPathIgnorePatterns": [
      "/node_modules/",
      "packager/react-packager/src/Activity/"
    ],
    "testFileExtensions": [
      "js"
    ],
    "unmockedModulePathPatterns": [
      "promise",
      "source-map"
    ]
  },
  "dependencies": {
    "babel-root-import": "^4.0.1",
    "react": "15.2.1",
    "react-native": "^0.30.0-rc.0",
    "react-native-aws-signature": "0.0.9",
    "react-native-fbsdk": "^0.2.2",
    "react-native-localization": "^0.1.15",
    "react-redux": "^4.4.5",
    "redux": "^3.5.2",
    "redux-storage": "^4.0.1",
    "redux-storage-engine-reactnativeasyncstorage": "^1.0.1"
  },
  "devDependencies": {
    "babel": "^6.5.2",
    "babel-jest": "^13.2.2",
    "babel-preset-react-native": "^1.9.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "jest-cli": "^13.2.3",
    "redux-logger": "^2.6.1"
  }
}

.babelrc
{
  "presets": ["react-native-stage-0"]
}

我错过了什么吗?我在Windows 10上运行所有内容。

0 个答案:

没有答案