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
I recently ported a JS project that uses AVA to TS. Using @ava/typescript itself worked fine, but I struggled with getting the nyc coverage to work (it was displaying 0% coverage for everything).
In the end this was caused by the fact that I had enabled the "all" option in nyc (Whether or not to instrument all files (not just the ones touched by your test suite). So after disabling this option coverage was working again.
I can publish the relevant code next week if needed.
For now I'm good with running nyc without the "all" option though.
The text was updated successfully, but these errors were encountered:
I'm happy to open the issue on their repo, but the reason I opened it here is that I've never had the issue when using that option on nyc with mocha or jest + TypeScript.
nyc applies quite a lot of hacks to record the coverage. @ava/typescript, while not as hacky, still requires JS code from a build directory, rather than the TypeScript code from a source directory. It's all a bit complicated.
I recently ported a JS project that uses AVA to TS. Using @ava/typescript itself worked fine, but I struggled with getting the nyc coverage to work (it was displaying 0% coverage for everything).
In the end this was caused by the fact that I had enabled the "all" option in nyc (Whether or not to instrument all files (not just the ones touched by your test suite). So after disabling this option coverage was working again.
I can publish the relevant code next week if needed.
For now I'm good with running nyc without the "all" option though.
The text was updated successfully, but these errors were encountered: