Answer the question
In order to leave comments, you need to log in
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
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). No platform natively supports ES6/7 fully. So let's live like this for now :)
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 questionAsk a Question
731 491 924 answers to any question