Skip to content

using mocha and babel-core/register running ES6 tests, Chinese charactors will cause error when compiling without cache.

Notifications You must be signed in to change notification settings

Isaddo/mocha-babel-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mocha-babel-test

Using mocha and babel-core/register running ES6 tests. Chinese charactors will cause error when compile without cache.

Reproduce Steps

  • npm install

  • npm test

First time running the test, we will get ReferenceError: recursiveFunc is not defined

  • then npm test

the test will pass.

  • if we run npm run test-no-cache

The error will appear again.

But, if we delete the comment "//要瘋了", first line at index.js

  • npm run test-no-cache

the test will pass

and if we change the method of recursive function delcare from

var recursiveFunc = function () { ... }

to

function recursiveFunc () { ... }

This error will not appear

About

using mocha and babel-core/register running ES6 tests, Chinese charactors will cause error when compiling without cache.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published