Depends on D11255. This diff refactors the broken tests by wrapping the rendered components in a WalletContext Provider with a mocked value, instead of mocking the useContext hook, which was interfering with child components that used the same hook, causing the tests to fail.
Details
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Commits
- rABC1909a08f731e: [cashtab] Fix broken tests which rendered antd Input components after jest 27…
npm install
npm test
All tests should pass.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- cashtab/fix-broken-tests-jest-27
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 18628 Build 37047: Build Diff Build 37046: arc lint + arc unit
Event Timeline
Comment Actions
Please apply this same fix to the other snapshot test files:
Airdrop.test.js, Configure.test.js, Home.test.js, and Receive.test.js