sourcecred/src
Dandelion Mané 24895b3c7d
Make `yarn test` more quiet (#1037)
This commit adds a new runOption for execDependencyGraph, namely
`printVerboseResults`. If this flag is true, then execDependencyGraph
will print a "Full Results" section along with the standard error and
standard out of every task, regardless of whether it failed or
succeeded. (Note, this is the existing behavior for all invocations
prior to this commit).

If the flag is not true, then execDependencyGraph will not print a full
results section, and stdout/stderr will be logged only for tasks that
fail.

This commit also modifies `yarn test` to use the new flag so that it
prints verbose tests only when the `--full` option is provided. This is
consistent with our sharness behavior: we print the full sharness logs
only when `--full` was provided.

This fixes #1035, and ensures that running `yarn test` has a high signal
to noise ratio (i.e. it only shows an enumeration of top level tasks).
This improves the developer ergonomics of SourceCred by not having a
super commonly used and core script spam the user with mostly irrelevant
information.

Test plan:

Run `yarn test` when all tests are passing, and observe that the output
has much less noise:

```
yarn run v1.12.3
$ node ./config/test.js
tmpdir for backend output: /tmp/sourcecred-test-6337SZ9smvWsWvqE

Starting tasks
  GO   ensure-flow-typing
  GO   check-stopships
  GO   check-pretty
  GO   lint
  GO   flow
  GO   unit
  GO   backend
 PASS  check-stopships
 PASS  ensure-flow-typing
 PASS  flow
 PASS  backend
  GO   sharness
 PASS  sharness
 PASS  check-pretty
 PASS  lint
 PASS  unit

Overview
Final result:  SUCCESS
Done in 11.66s.
```

Run `yarn test` when there is a real failure (e.g. a unit test failure)
and observe that full details on the failure, including the output from
stdout/stderr, is still provided.

Run `yarn test --full` and observe that full, verbose logs are provided.
2019-01-05 18:16:29 -08:00
..
analysis Improve performance of pagerank `decompose` (#1007) 2018-11-16 22:26:55 -08:00
assets/logo Add logo variants for CredBot and Discourse (#717) 2018-08-29 15:15:10 -07:00
cli core: allow repo ID registry to store metadata (#1003) 2018-11-09 17:28:39 -08:00
core Graph: move invariant checker to bottom of class (#1026) 2019-01-03 14:15:40 -08:00
explorer Add project title to explorer page (#1032) 2019-01-04 12:56:38 -08:00
graphql mirror: remove "demo" module (#978) 2018-11-01 11:29:57 -07:00
homepage core: allow repo ID registry to store metadata (#1003) 2018-11-09 17:28:39 -08:00
plugins Update the blacklisted object ids (#1018) 2018-11-28 12:39:19 -08:00
tools Make `yarn test` more quiet (#1037) 2019-01-05 18:16:29 -08:00
util MapUtil: provide exact output from `toObject` (#993) 2018-11-01 18:55:14 -07:00
webutil link: verify that routes have trailing slash (#1001) 2018-11-08 20:53:30 -08:00