我在这里提出了它作为一个问题。我能够进行单元测试 - 浅层渲染和测试反应原生组件,但是当我将 react-native-router 通量引入项目时,开始失败并出现错误
> test@0.0.1 test /Users/sseshac/src/personal/test/app/test
> mocha --require react-native-mock/mock.js --compilers js:babel-core/register --recursive test/*.js
/Users/sseshac/src/personal/test/app/test/node_modules/react-native-router-flux/index.js:1
(function (exports, require, module, __filename, __dirname) { import Actions from './src/Actions';
^^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Module._extensions..js (module.js:416:10)
at Object.require.extensions.(anonymous functi