Skip to content

Conversation

@AlexD10S
Copy link
Collaborator

Closes #236
Refactor old commands to use the CLI module (Introduced later), enabling mockable CLI output for tests.
Add a few missing tests.

@codecov
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 78.29233% with 150 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.20%. Comparing base (6fe3154) to head (80bcaaf).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-cli/src/commands/new/chain.rs 72.05% 55 Missing and 9 partials ⚠️
crates/pop-cli/src/commands/install/mod.rs 78.23% 22 Missing and 10 partials ⚠️
crates/pop-cli/src/commands/new/contract.rs 84.96% 2 Missing and 18 partials ⚠️
crates/pop-cli/src/commands/new/pallet.rs 86.84% 4 Missing and 6 partials ⚠️
crates/pop-cli/src/commands/up/contract.rs 0.00% 9 Missing ⚠️
crates/pop-cli/src/common/helpers.rs 87.50% 0 Missing and 8 partials ⚠️
crates/pop-cli/src/commands/new/mod.rs 92.85% 0 Missing and 2 partials ⚠️
crates/pop-cli/src/commands/bench/block.rs 0.00% 0 Missing and 1 partial ⚠️
crates/pop-cli/src/commands/bench/machine.rs 0.00% 0 Missing and 1 partial ⚠️
crates/pop-cli/src/commands/bench/pallet.rs 0.00% 1 Missing ⚠️
... and 2 more
@@            Coverage Diff             @@
##             main     #631      +/-   ##
==========================================
+ Coverage   77.10%   78.20%   +1.10%     
==========================================
  Files         109      109              
  Lines       25004    25441     +437     
  Branches    25004    25441     +437     
==========================================
+ Hits        19279    19896     +617     
+ Misses       3708     3464     -244     
- Partials     2017     2081      +64     
Files with missing lines Coverage Δ
crates/pop-cli/src/common/mod.rs 100.00% <ø> (ø)
crates/pop-cli/src/commands/bench/block.rs 73.26% <0.00%> (ø)
crates/pop-cli/src/commands/bench/machine.rs 73.07% <0.00%> (ø)
crates/pop-cli/src/commands/bench/pallet.rs 79.91% <0.00%> (-0.29%) ⬇️
crates/pop-cli/src/commands/bench/storage.rs 69.34% <0.00%> (ø)
crates/pop-cli/src/commands/mod.rs 70.11% <0.00%> (ø)
crates/pop-cli/src/commands/new/mod.rs 82.14% <92.85%> (+61.80%) ⬆️
crates/pop-cli/src/common/helpers.rs 86.15% <87.50%> (+86.15%) ⬆️
crates/pop-cli/src/commands/up/contract.rs 14.28% <0.00%> (-0.05%) ⬇️
crates/pop-cli/src/commands/new/pallet.rs 76.08% <86.84%> (+59.68%) ⬆️
... and 3 more

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexD10S AlexD10S requested a review from moliholy September 11, 2025 18:47
@AlexD10S AlexD10S marked this pull request as ready for review September 11, 2025 18:47
Copy link
Collaborator

@moliholy moliholy left a comment

Choose a reason for hiding this comment

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

LGTM! Much needed cleanup 🙏

@AlexD10S AlexD10S merged commit af79ac9 into main Sep 12, 2025
90 of 94 checks passed
@AlexD10S AlexD10S deleted the refactor/cli-module branch September 12, 2025 09:56
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.

refactor: all commands to use the CLI module.

3 participants