3 Minutes With Kent

Testing and Transpilation

Informações:

Sinopse

I got a question (https://egghead.io/forums/lesson-discussion/topics/how-to-write-a-javascript-library-adding-es6-support#post-4659) about why we test our pre-transpiled code (or rather, instrument that code for coverage) rather than our post-transpiled code. So here's my answer. I reference babel-plugin-__coverage__ (https://www.npmjs.com/package/babel-plugin-__coverage__) (use this with karma) and nyc (https://www.npmjs.com/package/nyc) (use this with tests run in node, like with mocha (https://www.npmjs.com/package/mocha) or ava (https://www.npmjs.com/package/ava)). Good luck!