HomePhabricator

[Cashtab] Add a jest setup file to avoid repeating global mocks

Description

[Cashtab] Add a jest setup file to avoid repeating global mocks

Summary:
Depends on D17083

Have duplicated these everywhere because it's a pretty deep rabbit hole trying to google fix jest issues like this.

However, this is one of the great use cases of modern AI products. Pretty great responses for troubleshooting obscure error messages that are not necessarily decipherable.

Use a setup file to avoid this repetition. For some reason, this does not "just work" with all the mocks (like bip39 and recaptcha-v3 and zxing). So, will look at adding those later, or leave them as isolated mocks.

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Wed, Nov 6, 01:14
bytesofmanPushed on Wed, Nov 6, 17:30
Reviewer
Restricted Project
Differential Revision
D17084: [Cashtab] Add a jest setup file to avoid repeating global mocks
Parents
rABC1c1ea9910873: [Cashtab] Add canvas mock to prevent annoying jest debug logs
Branches
Unknown
Tags
Unknown