Skip to content

Conversation

@aaronmgdr
Copy link
Member

@aaronmgdr aaronmgdr commented Nov 12, 2024

Description

the test take a while and the snapshots were very large with info that was not actually what were were testing.

also Accidentally added better account authorize tests


PR-Codex overview

This PR primarily focuses on enhancing the test cases for various commands in the CLI, specifically around election showing, validator deregistration, and account authorization. It improves the clarity of logs and ensures proper cleanup of mocks.

Detailed summary

  • Changed afterEach in election:show test to clear mocks.
  • Updated timeout constant from LONG_TIMEOUT_MS to EXTRA_LONG_TIMEOUT_MS in validator:deregister tests.
  • Added mock clearing for console.log and console.error in account:authorize tests.
  • Enhanced log output clarity for several test cases.
  • Ensured consistent error handling with rejects.toThrowErrorMatchingInlineSnapshot.
  • Improved inline snapshots for better readability and accuracy in test assertions.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

use very long timeout
clear the mock just before running command so the setup is not in there
@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2024

⚠️ No Changeset found

Latest commit: 34b2e72

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.23%. Comparing base (23d36cc) to head (2aa53ec).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
+ Coverage   68.01%   68.23%   +0.22%     
==========================================
  Files         288      288              
  Lines       10960    10979      +19     
  Branches     1563     1584      +21     
==========================================
+ Hits         7454     7492      +38     
+ Misses       3430     3349      -81     
- Partials       76      138      +62     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aaronmgdr
Copy link
Member Author

passed first test. but ill re run to be sure

@aaronmgdr
Copy link
Member Author

passed second run

…ons.

now when run they are not polluted by logs so you can see what is happening.
@aaronmgdr aaronmgdr marked this pull request as ready for review November 13, 2024 11:08
@aaronmgdr aaronmgdr requested a review from a team as a code owner November 13, 2024 11:08
@aaronmgdr aaronmgdr enabled auto-merge (squash) November 13, 2024 11:14
@aaronmgdr aaronmgdr merged commit d80a4f6 into master Nov 13, 2024
31 of 60 checks passed
@aaronmgdr aaronmgdr deleted the aaronmgdr/dereg-flake branch November 13, 2024 11:15
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