Skip to content

Conversation

@canac
Copy link
Contributor

@canac canac commented Jan 31, 2024

Description

I noticed that we have some components with zero test coverage. Because none of the lines are hit, jest isn't aware of them and doesn't include them in the coverage report. This PR adds the collectCoverageFrom config to explicitly include all TypeScript files in the coverage report so that our code coverage reports more accurately reflect reality.

I moved a few files to make sure that we aren't including test utilities in code coverage or excluding files that should have code coverage.

This PR will inevitably reduce code coverage but only because our code coverage report was falsely inflated before.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@canac canac requested a review from dr-bizz January 31, 2024 19:45
@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-867.d3dytjb8adxkk5.amplifyapp.com

@dr-bizz
Copy link
Contributor

dr-bizz commented Feb 1, 2024

Great find

Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🔥

@canac canac added the On Staging Will be merged to the staging branch by Github Actions label Feb 1, 2024
@canac canac merged commit 6d1e3d1 into main Feb 2, 2024
@canac canac deleted the jest-coverage branch February 2, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Staging Will be merged to the staging branch by Github Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants