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

No function coverage for named exports in barrel file #959

@superdyzio

Description

@superdyzio

Hello! I have a Nx project with Angular, one app, multiple libs, each of them has barrel file with exports - index.ts.

Some exports in those file goes like that export * from 'whatever', but there are also multiple named like export { Something } from 'whatever'. I have perfect coverage report for all of them but one.

In one of my libs, main barrel file of the lib gets 100% of statement coverage, but 0% of coverage in terms of functions on all my named exports. I cannot figure out why coverage works for named exports in other barrel files but in this particular one.

I made sure that things exported in uncovered lines are used in multiple places of both given lib and in app, they are also used in tests in both lib and app - all of these tests pass and have proper coverage.

Screen of coverage report (you can notice "8x" in terms of lines and red marking in terms of functions):
image

My env:
Angular@15.2.9
nx@15.9.0
jest@29.4.3
nrwl/jest@15.9.0
node@18.12.0

Anyone knows how to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions