By adding ES6 support to our source code, we need to add that same support to our tests so we can consume that synatx. This is quite easy with the --compilers
flag for Mocha
.
Following my comment on the previous lesson, --compilers will need js:babel-register for the test that watches. For the coverage test, babel-istanbul will need to replace istanbul without the need for --compilers.
for electron-Mocha i tried its not instrumenting i still see 0 coverage in the report, for Mocha yes it works fine