Page MenuHomePhabricator

[Cashtab] Only test staged files
ClosedPublic

Authored by bytesofman on Sep 1 2022, 20:04.

Details

Reviewers
tobias_ruck
Group Reviewers
Restricted Project
Commits
rABCdf57c56e023c: [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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cashtab-only-test-staged
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19917
Build 39540: Build Diffcashtab-tests
Build 39539: arc lint + arc unit