Skip to content
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

chore: add unit tests to sdk connect handlers #8005

Merged

Conversation

omridan159
Copy link
Contributor

@omridan159 omridan159 commented Dec 5, 2023

Description

Add unit tests to SDKConnect handlers to make the code more stable and reliable

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@omridan159 omridan159 requested a review from a team as a code owner December 5, 2023 14:39
Copy link
Contributor

github-actions bot commented Dec 5, 2023

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link
Contributor

@abretonc7s abretonc7s left a comment

Choose a reason for hiding this comment

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

Didn't go over all the tests but overall would need to change the cast using as with the using real types in the variables declarations

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9cb095c) 37.14% compared to head (635daa3) 37.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8005      +/-   ##
==========================================
+ Coverage   37.14%   37.92%   +0.78%     
==========================================
  Files        1139     1140       +1     
  Lines       29196    29196              
  Branches     2746     2746              
==========================================
+ Hits        10846    11074     +228     
+ Misses      17724    17478     -246     
- Partials      626      644      +18     

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

Copy link
Member

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

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

LGTM

@omridan159 omridan159 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Dec 8, 2023
Copy link

sonarcloud bot commented Dec 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@christopherferreira9 christopherferreira9 added QA in Progress QA has started on the feature. QA Passed A successful QA run through has been done and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. QA in Progress QA has started on the feature. labels Dec 11, 2023
@christopherferreira9 christopherferreira9 dismissed abretonc7s’s stale review December 12, 2023 09:03

Dismissing after an offline sync

@christopherferreira9 christopherferreira9 merged commit 813a800 into main Dec 12, 2023
31 of 32 checks passed
@christopherferreira9 christopherferreira9 deleted the chore_add-unit-tests-to-SDKConnect-handlers branch December 12, 2023 09:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
@metamaskbot metamaskbot added the release-7.15.0 Issue or pull request that will be included in release 7.15.0 label Dec 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.15.0 Issue or pull request that will be included in release 7.15.0 team-sdk SDK team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants