-
Notifications
You must be signed in to change notification settings - Fork 620
test: Add wallet connection hook tests #5689
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
| import { useActiveWalletConnectionStatus } from "./useActiveWalletConnectionStatus.js"; | ||
| import { useConnect } from "./useConnect.js"; | ||
|
|
||
| describe("useAddConnectedWallet", () => { |
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.
The describe block title should be useConnect to match the hook under test. The current title useAddConnectedWallet appears to be a copy/paste error.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5689 +/- ##
==========================================
+ Coverage 51.26% 51.29% +0.02%
==========================================
Files 1092 1092
Lines 57375 57375
Branches 4691 4692 +1
==========================================
+ Hits 29416 29431 +15
+ Misses 27243 27228 -15
Partials 716 716
*This pull request uses carry forward flags. Click here to find out more. |

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR introduces a
MockStorageclass for testing and updates various hooks related to wallet management in thethirdweblibrary. It enhances test coverage by implementing mock storage functionality and ensuring proper error handling in wallet connection scenarios.Detailed summary
MockStorageclass instorage.tsto simulate storage operations.useSetActiveWallet,useAddConnectedWallet, anduseConnecttests to useMockStorage.<ThirdwebProvider>.