G
G
GeraldIstar2015-11-09 11:43:24
JavaScript
GeraldIstar, 2015-11-09 11:43:24

Javascript coverage of transpiled code?

The client side is written in ES6/7 and is built using webpack using aliases. Currently in the process of covering the existing code base with unit tests. And to understand what is covered by tests and what is not, you need a test coverage tool. The problem is that I was only able to set it up for the built client code, which is not very convenient. Has anyone encountered a similar problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Kitmanov, 2015-11-09
@GeraldIstar

Have you looked at https://github.com/douglasduteil/isparta? you can also try to install istanbul from the branch:

"istanbul": "git://github.com/gotwarlost/istanbul.git#source-map"
(suitable for TS).
Here is the article: www.aptoma.com/es6-code-coverage-babel-jspm-karma-...

Y
Yaroslav Lyzlov, 2015-11-09
@dixoNich

No platform natively supports ES6/7 fully. So let's live like this for now :)

D
Denis Ineshin, 2015-11-09
@IonDen

This is a problem with any languages ​​that compile to JS (ES2015, CoffeScript, TypeScript, etc.) They don't run natively in the browser, so tests will only run on production code anyway. Another thing is that ES2015 will soon work in browsers (in the same chrome, many of its parts work with "use strict" enabled). So just wait a year)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question