Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants