-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Test Suite, Achieve 80% Coverage #41
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Heimdall Review Status
|
ProfMoo
commented
Dec 4, 2024
@@ -17,8 +17,9 @@ jobs: | |||
- uses: actions/checkout@v4 | |||
- uses: actions/setup-node@v4 | |||
with: | |||
node-version: "20.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to bump this so that I can use the most recent versions of chai
. I was running into some ESModule/Common tsconfig.json
issues without it.
If this is undesired, we can try to revert and look deeper into why I was running into interop issues. Can get tricky 😬.
marcin-cb
approved these changes
Dec 4, 2024
drohit-cb
approved these changes
Dec 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description Of Change
This PR adds a testing suite to this repository, achieving 80%+ test coverage of all relevant client files.
While working on the test suite, I ran across an old method on the client
performWorkflowStep
which was broken. As far as we can tell, no one uses this method and it doens't fit into the API surface of our Staking API anymore. So I've gone ahead and removed it. This makes this PR a breaking change.I attempted to modify as little actual client code as possible while making these changes, focusing only on the testing and the appropriate coverage. Slight alterations were made, where necessary, to achieve maximal coverage (ex: exporting a method).
As you can see in the image attached in a comment, we've achieved 80%+ on statements and lines. We can still improve coverage for branches and funcs. But considering we started at 0 across the board, this is a huge improvement. The coverage image I posted can be regenerated via
npm run coverage
.Testing Procedure
Added dozens of tests and achieved 80%+ test coverage :)