You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.
I have a React Native component that imports some stuff from this package. I am trying to test this component with enzyme, using Mocha as the driver. I get the following error:
$ mocha --require react-native-mock/mock --compilers js:babel-core/register --recursive imports/**/*.tests.js
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-material-design/lib/index.js:1
(function (exports, require, module, __filename, __dirname) { export { COLOR, TYPO, PRIMARY_COLORS, THEME_NAME } from './config';
^^^^^^
SyntaxError: Unexpected token export
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/babel-register/lib/node.js:159:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (imports/ui/components/shared/ActionButtons/ActionButtons.jsx.js:1:1)
at Module._compile (module.js:541:32)
at loader (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/babel-register/lib/node.js:151:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/babel-register/lib/node.js:161:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (imports/ui/components/shared/ActionButtons/ActionButtons.tests.js:9:1)
at Module._compile (module.js:541:32)
at loader (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/babel-register/lib/node.js:151:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/babel-register/lib/node.js:161:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at /Users/jcursi/Sites/joncursi/redbirdNative/node_modules/mocha/lib/mocha.js:220:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/mocha/lib/mocha.js:217:14)
at Mocha.run (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/mocha/lib/mocha.js:485:10)
at Object.<anonymous> (/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/mocha/bin/_mocha:405:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.runMain (module.js:575:10)
at run (node.js:348:7)
at startup (node.js:140:9)
at node.js:463:3
npm ERR! Test failed. See above for more details.
Not sure how to get past this error. Do I need to install some babel plugins to get it to recognize the export keyword being used by this package?
The text was updated successfully, but these errors were encountered:
I have a React Native component that imports some stuff from this package. I am trying to test this component with enzyme, using Mocha as the driver. I get the following error:
Not sure how to get past this error. Do I need to install some babel plugins to get it to recognize the
export
keyword being used by this package?The text was updated successfully, but these errors were encountered: