-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code coverage as a bundle metric #263
Comments
Any idea how to get this data? |
According to Jest currently it can be done via:
probably offloading all this stuff to Istanbul is the best option. |
I've implemented similar approach in tradingview/lightweight-charts#517 and I had the following idea in mind - the library provides isn't supposed to be working with tree-shaking (because we minified bundled code better than almost any consumer's minifier could do and because of library's API) so we wanted to make sure that the shipped code doesn't have any "dead" code in it. Thus I implemented a test to verify that:
In other (library-agnostic) words the algorithm was the following:
|
Two things:
wondering, would this extra metric be useful, including usecase for creation solutions with less “boot time footprint”. The “code usage percentage” falls into the same bucket as “code size” and “execution time”, so it would not be that alien for size-limit functionality, however there is an open question how to make it actually usable and useful.
The text was updated successfully, but these errors were encountered: