- npm i babel-core babel-preset-env; npm i -g mocha
- add .babelrcand two.jsfiles to current dir
- run mocha --require babel-core/register foo.js
          Created
          December 11, 2017 16:26 
        
      - 
      
- 
        Save boneskull/5e0091e59d85c082bb36c06a66009774 to your computer and use it in GitHub Desktop. 
    minimal mocha + babel setup to show import/export working
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              Show hidden characters
| { | |
| "presets": ["env"] | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | export default 'foo'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import foo from './bar'; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment