-
Notifications
You must be signed in to change notification settings - Fork 10
Coverage with NYC #7
Comments
Hey @wbhob. Excellent point... I played around and tried a bunch of stuff, but the bad news is I am currently not able to get working coverage reports either 😕 Some of the code transparently added by TypeScript or NYC just crashs with So this is an unsolved issue as of now. |
I got this working! Here's my {
"extension": [
".ts",
".tsx"
],
"include": ["src/**/*.ts"],
"reporter": [
"text",
"html"
],
"cache": true,
"sourceMap": false,
"instrument": false
} Then I run
I haven't had any issues with this method whatsoever. :) |
Thanks for sharing, @Harangue! :) Runs without crashing for me, too, but I don't get any coverage in my test project... (Source files are matched by |
Yeah @andywer, it seems I spoke too soon. I got it to run test coverage for all of my files once, somehow, but never again after that. I've been looking at this blog post to try to uncover what's wrong but I'm afraid I don't understand all of the mechanics of how ava reports to instanbul. |
Hmm, here's my nyc config now: {
"include": [
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts"
],
"extension": [
".ts"
],
"require": [
"ts-node/register"
],
"reporter": [
"html",
"text"
],
"sourceMap": false,
"instrument": true,
"all": true
} This seems to find all of my files (the |
in my case NYC is ignoring the coverage from tests
|
@sigmasoldi3r Ava supports .ts files now (and coverage reports are working for me too). |
@jack-guy yes but if you are using babel 7 + typescript then you are still tends on ava-ts. I didn't find different solution. Can you be more explicit about support of ts files? |
When I exclude:
I am seeing this error:
|
@dougmolineux Still hard to tell if this has to do with AVA-TS or just TypeScript... Are you talking about an |
I deleted the template because I have a simple question: how do I output coverage with ava-ts?
The text was updated successfully, but these errors were encountered: