Bounty on Gitcoin (0.02 ETH reward): https://gitcoin.co/issue/talentlessguy/use-onboard/1/100026116
I'm not good at integration testing and better that someone else does it.
What's needed
- Pick a integration testing tool, the smaller and faster it is the better
- write lots of tests and achieve 100% coverage (you can check coverage locally)
- pull request the tests
What you shouldn't do
- don't hardcore wallet addresses in tests. Either use env variables or create a wallet with random key using ethers.js. PM me to add secrets in a GitHub env
- don't use any CommonJS transpilators for tests. Tests must be pure ESM as well as the source. CommonJS fallback that is used in Rollup will be soon removed, since Next.js got ESM externals feature in the
11.0.2-canary.10
release, so please be aware of that. - don't use jest (bc it's too heavy and contains too much unnecessary stuff)
What to consider
- please keep the formatting correct and fix all lint errors you get. It's already handled by husky, but still
- would be awesome if the tool you choose has a GitHub app, so it can report coverage change on commit / PR
Some test examples
Not the full list, just to give an idea which tests are required:
- wallet options
- should work without constructor
- should work without
appId
- should support different chains (with
networkId
) - should support passed wallet providers
- should use initial data while the hook is loading
- hook properties
isWalletSelected
- false by default
- should set
isWalletSelected
to true after successful wallet connect
thanks to whoever writes the tests, I appreciate it a lot :)