Page MenuHomePhabricator

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

Authored by bytesofman on Wed, Nov 6, 01:17.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable