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
Problems with --all #603
Comments
Bump up! |
@marshmellow1328 Try to change included folder from "dist/src/**/*" to
|
"Problems with --all" is a bit vague but I'm having a similar issue. I have the following mocha.opts:
The following options for nyc in package.json:
I run |
@sgronblo @sublimeye @marshmellow1328 sorry for the slow reply, have been dealing with some personal issues and have been an abysmal OSS maintainer the past few months. For starters, I would make sure that you configure it so Otherwise, perhaps @JaKXz can chime in who's done more work with TypeScript than myself. |
@ciekawy This might be a good starting point for debugging your projects, if you're finding you're unable to have nyc instrument the require statement. |
as mentioned #610 (comment) the key change for me was to use ES5 target. To do it just for test I'm using
where |
I have encountered a similar problem. I get a correct coverage report for all files that are used by the unit tests. Files that are not covered at all are not included in the report. When I add If I add a Is this the same problem as described here? Did you find a workaround? |
We have the same problem as in the original issue from @marshmellow1328. We don't want to make use of Everything did work fine before setting the -all flag. Any solution/workaround available? |
We're experiencing a similar issue. When adding Sometimes it's correct: ... and sometimes it's wrong: While some files that have 100% coverage suddenly start reporting lower coverage values and wrong source mappings, other files that are part of the report still report correct numbers and source mappings. When we remove $(npm bin)/nyc $(npm bin)/ts-node --require tsconfig-paths/register tests/index.ts Our current "solution" is to remove |
I'm using TypeScript with Jasmine like @marshmellow1328 and @SanderDeWaal1992 and the coverage reports are reliably correct with
Notice that I don't include TypeScript version: 3.0.1 |
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. |
Why has it been closed? Was it ever fixed? |
It was originally closed by the stale bot which was initially a bit aggressive. That said I believe the issue with |
No matter what, current latest version of
|
@hari-007 On quick look at what you've posted {
"all": true
} Beyond this please open a new issue including all required information. Given limited time of maintainers smaller reproduction repositories will get looked at faster than a large repository. |
Background
I'm using TypeScript with Jasmine. The only way I figured out how to get nyc to work with Jasmine was to point Jasmine at the transpiled tests. Using
sourceMap
, the coverage report looks good until I add"all: true"
in my nyc config.Tests are run using
npm test
which runsnyc jasmine
. The nyc config in package.json looks like:Expected Behavior
I would expect both the files loaded in tests and the files without any coverage to be mapped to their TypeScript source.
Observed Behavior
The files which aren't loaded by tests report their JS versions instead of the TS versions I'd expect. The files being loaded in tests still report against the TS version.
Bonus Points! Code (or Repository) that Reproduces Issue
I can't share the repo, but if this is being a problem to recreate I could create a dummy repo with the same setup.
Forensic Information
Operating System: Ubuntu 16.04
Environment Information:
sh -c 'node --version; npm --version; npm ls' > output.txt
https://gist.github.com/marshmellow1328/b086ec34ac8ea8521c23bed60ed59329
The text was updated successfully, but these errors were encountered: