Skip to content

Conversation

@rockaxorb13
Copy link

Description

This PR updates the package.json configuration to automatically generate and display a Code Coverage Summary whenever npm test is run. This aligns the developer experience with other Accord Project repositories (like concerto) and helps identify untested areas of the codebase.

Changes

  • Updated package.json scripts: Added --coverage --coverageReporters=text-summary to the test command.
  • Configured Jest: Added coveragePathIgnorePatterns to exclude node_modules, test/, and auto-generated model-gen files from the coverage calculation to ensure the metrics reflect actual source code quality.

Fixes

Fixes #1

Sample Output

=============================== Coverage summary ===============================
Statements   : 49.59% ( 800/1613 )
Branches     : 23.91% ( 188/786 )
Functions    : 31.25% ( 80/256 )
Lines        : 49.27% ( 782/1587 )
================================================================================

Test Suites: 1 failed, 9 passed, 10 total
Tests:       1 failed, 49 passed, 50 total
Snapshots:   32 passed, 32 total
Time:        53.737 s
Ran all test suites.

Note on CI status

I observed that the current main branch has regression failures (specifically ValidationException: ... field "nodes" has a value of "undefined"). Those failures are unrelated to this configuration change, and I plan to address them in a separate PR.

Signed-off-by: Aadityavardhan Singh <singhrashmi018@gmail.com>
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

Successfully merging this pull request may close these issues.

Test Coverage

1 participant