You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux JABAILE-DESK02 5.15.90.1-microsoft-standard-WSL2 Detailed coverage #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
I can only apologize in advance for this one...
I work on TypeScript, and I've been wanting to set up coverage information for the compiler. c8 does a great job; significantly faster than nyc (of course). I use c8 in my own projects with success.
However, capturing coverage for the compiler produces results that are too high to believe. checker.ts is a 50k line file, and yet its coverage is:
There's no way that we actually have tested every line of the checker. And indeed, adding a function to a known-dead path (like one ending in Debug.assertNever) indicates that the line is covered when it definitely is not, and the overall count doesn't change.
I don't know if I have a good repro for this besides npx c8 npm test -- --no-lint on our repo. Obviously that's huge but I don't really know where to start.
At best, I can observe that npx c8 npm test -- --no-lint --no-bundle works better, i.e. not using esbuild and instead running the tsc output produces a more believable coverage count:
I can only apologize in advance for this one...
I work on TypeScript, and I've been wanting to set up coverage information for the compiler. c8 does a great job; significantly faster than nyc (of course). I use c8 in my own projects with success.
However, capturing coverage for the compiler produces results that are too high to believe.
checker.tsis a 50k line file, and yet its coverage is:There's no way that we actually have tested every line of the checker. And indeed, adding a function to a known-dead path (like one ending in
Debug.assertNever) indicates that the line is covered when it definitely is not, and the overall count doesn't change.I don't know if I have a good repro for this besides
npx c8 npm test -- --no-linton our repo. Obviously that's huge but I don't really know where to start.At best, I can observe that
npx c8 npm test -- --no-lint --no-bundleworks better, i.e. not using esbuild and instead running the tsc output produces a more believable coverage count: