Page MenuHomePhabricator

[Cashtab] Remove render-only snapshot tests
ClosedPublic

Authored by bytesofman on Dec 22 2023, 00:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCfa47240e521f: [Cashtab] Remove render-only snapshot tests
Summary

Not enough thought has gone into how and why snapshot testing occurs in Cashtab. Snapshot testing is an easy way to get coverage for components that otherwise appear untested. However, a snapshot test that is only gauging whether or not a component will render is effectively the same as checking whether or not npm run build succeeds.

The right way to test each component is to work in real situations and integration tests. QRCode.test.js is a good model for this.

Boilerplate snapshot tests have not caught any errors for the last 2 years but have caused a lot of headaches in dev review. So, lose render-only snapshot tests. Make sure snapshots that are kept are up to date (BCH -> XEC).

Test Plan

npm test

Diff Detail

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