-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Coverage reports don't include TS files unless explicitly compiled #742
Comments
I think I solved this by reducing the config file to {
"cache": true,
"extensions": [
".ts"
],
"report-dir": "./coverage",
"reporter": [
"cobertura",
"html",
"text",
"text-summary"
],
"temp-directory": "./coverage/.nyc_output"
} Especially removing |
Please see microsoft/TypeScript#24993, I'm interested in overhauling our TypeScript support and would love your feedback and requirements. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@lumaxis The extension configuration key for nyc is |
@kleinfreund Wow 🤦🏼♂️ I never noticed that … |
@lumaxis Oh, it is relevant. I need the following in my package.json for nyc to recognize the TypeScript source files I’m testing with ava. "nyc": {
"extension": [
".ts"
]
} |
Sure, that's still valuable information but I don't think it's wise for me to edit my original post. |
@kleinfreund seems like maybe we could add another tutorial to https://istanbul.js.org/ and/or a note in the README about needing to support I'd argue this specific issue can be closed though; want to go ahead and open an issue if you think it's worthwhile, or heck, would happily take a pull request. |
@lumaxis would you mind trying something like this? istanbuljs/istanbuljs#282 |
Expected Behavior
When running
nyc
withmocha
which is usingts-node
to transpile TypeScript files on the fly, TypeScript files should be part of the coverage report.Observed Behavior
nyc
is only generating coverage output for the only.js
file in my project:It however works when I first manually compile all my files using
tsc
and then it even shows the actual.ts
files, not only the.js
files.Forensic Information
Operating System: macOS 10.13.1
Environment Information: https://gist.github.com/lumaxis/cd33c2bbf98dab6e4f5dcc9ff6bf5984
.nycrc
mocha.opts
The text was updated successfully, but these errors were encountered: