HomePhabricator

[cashtab] Fix broken tests which rendered antd Input components after jest 27…

Description

[cashtab] Fix broken tests which rendered antd Input components after jest 27 upgrade

Summary: 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.

Test Plan:
npm install
npm test

All tests should pass.

Reviewers: bytesofman, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: bytesofman, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D11258

Details

Provenance
alcipirAuthored on Mar 25 2022, 00:56
alcipirPushed on Mar 25 2022, 16:46
Reviewer
Restricted Owners Package
Differential Revision
D11258: [cashtab] Fix broken tests which rendered antd Input components after jest 27 upgrade
Parents
rABCb75642178a71: [Cashtab] Run tests in UTC timezone
Branches
Unknown
Tags
Unknown