jestjs / jest

Delightful JavaScript Testing.
https://jestjs.io
MIT License
44.14k stars 6.45k forks source link

[Bug]: Fails to report coverage of test files #14773

Open Dreamsorcerer opened 9 months ago

Dreamsorcerer commented 9 months ago

Version

29.7

Steps to reproduce

I've added to the config: collectCoverageFrom: ["src/**", "tests/**"],

But, it doesn't report any coverage under the tests directory.

Expected behavior

Coverage of test files to be included.

Actual behavior

Only covers the source files.

Additional context

We've been extending coverage reports to test files for all our projects over the past couple of years and it has highlighted several cases of tests not being run or similar such issues. Being able to check that tests have 100% coverage is very helpful to avoid these issues and make maintenance easier.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 8 months ago

.

Dreamsorcerer commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 6 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 5 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 4 months ago

.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 3 months ago

.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 2 months ago

.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 1 month ago

.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Dreamsorcerer commented 1 week ago

.