Skip to content

Instantly share code, notes, and snippets.

@boneskull
Created December 11, 2017 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boneskull/5e0091e59d85c082bb36c06a66009774 to your computer and use it in GitHub Desktop.
Save boneskull/5e0091e59d85c082bb36c06a66009774 to your computer and use it in GitHub Desktop.
minimal mocha + babel setup to show import/export working
{
"presets": ["env"]
}
  1. npm i babel-core babel-preset-env; npm i -g mocha
  2. add .babelrc and two .js files to current dir
  3. run mocha --require babel-core/register foo.js
export default 'foo';
import foo from './bar';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment