mattkrick / redux-optimistic-ui

a reducer enhancer to enable type-agnostic optimistic updates
MIT License
693 stars 36 forks source link

Improve Babel coverage instrumentation #34

Closed marcins closed 7 years ago

marcins commented 7 years ago

Use the babel-preset-istanbul to provide better coverage instrumentation of ES6 sources. Add nyc config to pacakge.json as per instructions at https://github.com/istanbuljs/nyc#use-with-babel-plugin-istanbul-for-babel-support, and change the command for running tests to use NODE_ENV=test via cross-env.

This also adds the production of a HTML coverage report into the coverage directory, so this directory has been added to .gitignore.

Note that the reported coverage will be lower than previously, but more accurate for the sources. It's mostly around the console.errors for invalid transaction ids - the attempt to cover which led me to discover the bug in #32.