HomePhabricator

[Cashtab] Only test staged files

Description

[Cashtab] Only test staged files

Summary:
Cashtab is configured to test all files if the husky precommit hook is triggered. This hook can trigger by users editing outside of Cashtab.

This diff prevents such users from running all Cashtab unit tests. Instead, unit tests will only be run on changed Cashtab files (which would be none).

Coverage threshholds are dropped to arbitary low value of 1%, as CI requires a coverage threshhold. Unit tests may fail the previous 15% thresshold when taken in isolation.

Test Plan:

  1. Add //Test to line 118 of Send.js
  2. Run
git add .
git commit --amend --no-edit
  1. Note that only Send.js related unit tests run

Reviewers: #bitcoin_abc, tobias_ruck

Reviewed By: #bitcoin_abc, tobias_ruck

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

Details

Provenance
bytesofmanAuthored on Sep 1 2022, 20:00
bytesofmanPushed on Sep 1 2022, 20:26
Reviewer
Restricted Project
Differential Revision
D11906: [Cashtab] Only test staged files
Parents
rABC4f4dfb25d710: Update makeseeds.py for 0.26.x
Branches
Unknown
Tags
Unknown