Page MenuHomePhabricator

[Cashtab] Bring back noisy test logs if not in CI
ClosedPublic

Authored by bytesofman on Mon, Jan 6, 03:47.

Details

Reviewers
emack
Fabien
Group Reviewers
Restricted Project
Commits
rABCaa4a52165ea8: [Cashtab] Bring back noisy test logs if not in CI
Summary

The silent logs are great and should def be used in CI. However I routinely use the (noisy) logs for Cashtab dev to check variables, see how functions are behaving, even very normal behavior like screen.debug(null, Infinity) to see what the DOM looks like at a certain step of a test.

It's happened a few times now that these logs didn't work and I forgot why, then had to manually adjust this, then set it back before putting up a diff.

I think this is a better permanent solution, even at the cost of noisy local test logs.

Test Plan

npm test locally and logs are loud

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cashtab-noisy-logs-non-ci
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31954
Build 63400: Build Diffcashtab-tests
Build 63399: arc lint + arc unit

Event Timeline

bytesofman published this revision for review.Mon, Jan 6, 03:55
This revision is now accepted and ready to land.Mon, Jan 6, 08:28
Fabien requested changes to this revision.Mon, Jan 6, 08:46
Fabien added a subscriber: Fabien.

There is no point degrading the experience of all users because you need a special case for your debugging workflow.
If you want to do get a more verbose output for debugging, either comment this (you're changing the code for your debug anyway) or maybe better, create a new test script like 'test-debug' that doesn't have this --silent flag. So that npm run test is clean and npm run test-debug is verbose

This revision now requires changes to proceed.Mon, Jan 6, 08:46

default silent logs with npm test, add debug command to print logs

Fabien added inline comments.
cashtab/scripts/test.js
36
This revision is now accepted and ready to land.Tue, Jan 7, 13:26