test: cover default config and wallet hooks
Summary
- add tests for getDefaultWallets
- add tests for getDefaultConfig
- add tests for useWalletConnectors
Testing
-
pnpm lint -
pnpm test
https://chatgpt.com/codex/tasks/task_e_6851b442262c83259cc0222f42a5fd9d
PR-Codex overview
This PR focuses on adding unit tests for various wallet-related functionalities in the rainbowkit package, including getDefaultWallets, getDefaultConfig, and useWalletConnectors, while also making some adjustments to the test setup.
Detailed summary
- Added unit tests for
getDefaultWalletsinpackages/rainbowkit/src/wallets/getDefaultWallets.test.ts. - Added unit tests for
getDefaultConfiginpackages/rainbowkit/src/config/getDefaultConfig.test.ts. - Added unit tests for
useWalletConnectorsinpackages/rainbowkit/src/wallets/useWalletConnectors.test.tsx. - Updated
getDefaultWalletsto returnReturnType<typeof connectorsForWallets>forconnectors. - Modified the
setup.tsfile to includebeforeAllandafterAllfor silencing logs during tests. - Adjusted
WalletButton.test.tsxto simplify error handling and improve test readability. - Updated
MobileOptions.test.tsxto definefailingWalletusing type assertion.
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
🦋 Changeset detected
Latest commit: 21c27fb898b14f5aa75a7960605c7a29107be986
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 18 packages
| Name | Type |
|---|---|
| @rainbow-me/rainbowkit | Patch |
| example | Patch |
| @rainbow-me/rainbow-button | Patch |
| rainbowkit-next-app | Patch |
| site | Patch |
| with-create-react-app | Patch |
| with-next-app-i18n | Patch |
| with-next-app | Patch |
| with-next-custom-button | Patch |
| with-next-mint-nft | Patch |
| with-next-siwe-iron-session | Patch |
| with-next-siwe-next-auth | Patch |
| with-next-wallet-button | Patch |
| with-next | Patch |
| with-react-router | Patch |
| with-remix | Patch |
| with-vite | Patch |
| with-next-rainbow-button | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| rainbowkit-example | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2025 9:07pm |
| rainbowkit-site | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2025 9:07pm |