Skip to content
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

Zero coverage from export only files #930

Open
alondahari opened this issue Mar 27, 2020 · 3 comments
Open

Zero coverage from export only files #930

alondahari opened this issue Mar 27, 2020 · 3 comments

Comments

@alondahari
Copy link

I have index.ts files which only export the default from another file, like so:

export { default } from './pathToOtherFile'

The coverage on those files is reported at zero, although they are imported in the test file.
Adding /* istanbul ignore next */ is a working workaround.

Thanks!

@jvanoostveen
Copy link

I've been trying to add the /* istanbul ignore next */ but without luck, where did you place it? Above the line with the export?
It seems most exports will be uncovered, although when I directly make use of it, it is covered. Exported types are seemingly unable to cover with TypeScript 3.9 / tslib 2.0.

@jvanoostveen
Copy link

For some reason, it seems only to apply to re-exports, thus an import with an export (or combined in one line like yours).

@chriscarrillo
Copy link

Any update on this issue? I also tried to add the ignore but it doesn't work for me either. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants