Skip to content

Align coverage thresholds and documentation with actual test coverage#99

Closed
Copilot wants to merge 3 commits into
copilot/combine-integration-tests-and-fixesfrom
copilot/update-jest-coverage-thresholds-again
Closed

Align coverage thresholds and documentation with actual test coverage#99
Copilot wants to merge 3 commits into
copilot/combine-integration-tests-and-fixesfrom
copilot/update-jest-coverage-thresholds-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

CI failing on coverage checks: jest.unit.config.js enforced 80% thresholds while actual coverage is ~46%, and documentation across 4 files conflicted with both the enforced values and the actual coverage reality.

Changes

jest.unit.config.js

  • Updated coverage thresholds: branches 80→35%, functions/lines/statements 80→45%
  • Matches existing jest.config.js thresholds (already at 35/45/45/45)
  • Aligns with current coverage: branches 37.67%, functions 46.47%, lines 47.35%, statements 46.4%

Documentation sync

  • CONTRIBUTING.md: Core modules 80→45%, API endpoints 85→50%, contracts 90→60%, overall 75→35%
  • TESTING.md: Updated coverage goals to 35/45/45/45%
  • docs/CI_WORKFLOW.md: Updated threshold descriptions
  • docs/WALLET_SETUP_GUIDE.md: Updated test coverage requirements

All documented thresholds now match enforced thresholds and reflect actual project coverage standards.

Original prompt

The CI is failing because the coverage thresholds in jest.config.js are set to 80% but the actual coverage is around 46%. All tests pass successfully.

Please update the jest.config.js file to change the coverageThreshold section from 80% to more realistic values:

  • branches: 35 (currently at 37.67%)
  • functions: 45 (currently at 46.47%)
  • lines: 45 (currently at 47.35%)
  • statements: 45 (currently at 46.4%)

The file is at the root level: jest.config.js
Look for lines 14-21 with the coverageThreshold configuration.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…5%, 45%, 45%, 45%)

Co-authored-by: colleenpridemore <4281084+colleenpridemore@users.noreply.github.com>
Copilot AI changed the title [WIP] Update coverage thresholds in jest.config.js Fix CI coverage threshold failure in jest.unit.config.js Jan 30, 2026
Copy link
Copy Markdown
Contributor

@colleenpridemore colleenpridemore left a comment

Choose a reason for hiding this comment

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

Ok!

@colleenpridemore colleenpridemore marked this pull request as ready for review January 31, 2026 01:17
Copilot AI review requested due to automatic review settings January 31, 2026 01:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Jest unit test coverage thresholds in jest.unit.config.js to fix CI failures caused by unrealistic 80% coverage requirements when actual coverage is approximately 46%.

Changes:

  • Reduced coverage thresholds in jest.unit.config.js from 80% to realistic values (branches: 35%, functions/lines/statements: 45%) to align with current test coverage and prevent CI failures

Comment thread jest.unit.config.js
Comment on lines +27 to +30
branches: 35,
functions: 45,
lines: 45,
statements: 45
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

Lowering coverage thresholds conflicts with established project standards. Multiple documentation files explicitly require 80% coverage:

  • CONTRIBUTING.md line 467: "Core modules: 80% coverage"
  • TESTING.md lines 468-471: ">80% for statements, functions, and lines"
  • docs/CI_WORKFLOW.md line 39: "Coverage thresholds: 80%"
  • docs/WALLET_SETUP_GUIDE.md lines 415-418: All metrics ">80%"

While this change fixes the immediate CI failure, it significantly lowers quality standards and creates a discrepancy between documented expectations and enforced thresholds. Consider either: (1) improving test coverage to meet the 80% standard, or (2) updating all documentation to reflect the new 35-45% thresholds if that's the new project standard.

The root jest.config.js already has these lower thresholds (35/45/45/45), suggesting this may be intentional, but the documentation needs updating to maintain consistency.

Suggested change
branches: 35,
functions: 45,
lines: 45,
statements: 45
branches: 80,
functions: 80,
lines: 80,
statements: 80

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated documentation to align with the realistic coverage thresholds (35% branches, 45% functions/lines/statements) that are already in place in jest.config.js. Modified CONTRIBUTING.md, TESTING.md, docs/CI_WORKFLOW.md, and docs/WALLET_SETUP_GUIDE.md to reflect these standards. Commit: 29113c6

@colleenpridemore
Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

…anches, 45% functions/lines/statements)

Co-authored-by: colleenpridemore <4281084+colleenpridemore@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 31, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • rpc-mumbai.maticvigil.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/VEXEL/VEXEL/node_modules/jest-REDACTED/node_modules/jest-worker/build/workers/processChild.js de 20.0/deps/openss-I deps�� Release/obj.targ-I (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/VEXEL/VEXEL/node_modules/jest-REDACTED/node_modules/jest-worker/build/workers/processChild.js (dns block)
  • scarf.sh
    • Triggering command: /usr/local/bin/node node ./report.js ../../nan -I ode_�� 20.0/include/nod-I (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Fix CI coverage threshold failure in jest.unit.config.js Fix CI coverage threshold failure and update documentation to match realistic thresholds Jan 31, 2026
Copilot AI changed the title Fix CI coverage threshold failure and update documentation to match realistic thresholds Align coverage thresholds and documentation with actual test coverage Jan 31, 2026
@colleenpridemore
Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot apply changes based on the comments in this thread

The changes have already been applied. The code review feedback was addressed in commit 29113c6, which updated all documentation files (CONTRIBUTING.md, TESTING.md, docs/CI_WORKFLOW.md, and docs/WALLET_SETUP_GUIDE.md) to reflect the realistic coverage thresholds (35% branches, 45% functions/lines/statements). The PR overview comment you referenced doesn't contain actionable feedback - it's just a summary of the changes.

Copy link
Copy Markdown
Contributor

@colleenpridemore colleenpridemore left a comment

Choose a reason for hiding this comment

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

ok!

@colleenpridemore
Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot apply changes based on the comments in this thread

All requested changes are complete. Commit ba1af60 updated jest.unit.config.js thresholds to 35/45/45/45%, and commit 29113c6 updated all documentation (CONTRIBUTING.md, TESTING.md, docs/CI_WORKFLOW.md, docs/WALLET_SETUP_GUIDE.md) to match. The PR overview you referenced contains no additional actionable items.

Copy link
Copy Markdown
Contributor

@colleenpridemore colleenpridemore left a comment

Choose a reason for hiding this comment

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

ok!

Copy link
Copy Markdown
Contributor

Superseded by #100

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.

3 participants