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

Documentation on how to unit test with creating a mock wallet provider. #1014

Open
LukasDeco opened this issue Aug 26, 2024 · 1 comment
Open

Comments

@LukasDeco
Copy link

LukasDeco commented Aug 26, 2024

Is your feature request related to a problem? Please describe.
I have had a lot of difficulty testing components that rely on useWallet and I haven't been able to figure out how to setup a mock wallet context with a dummy publicKey that I can test with. An example of how to do this(if it's possible given the current package exports) would be really helpful I think for the dev community.

Describe the solution you'd like
A documented example of running a unit test with some test provider component like a <MockWalletProvider /> which shows how to setup such a component so that it has the publicKey of your choice, and it would be really nice to even show how to create a mock wallet that can send transactions.

Describe alternatives you've considered
When I google search or look in the docs, I haven't seen anything about how to do this. I actually think if we exported WalletProviderBase we might be able to do this.

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

No branches or pull requests

5 participants
@LukasDeco and others