fe488c12

Author: Tom Sydney Kerckhove <syd@cs-syd.eu>

Committer: Tom Sydney Kerckhove <NorfairKing@users.noreply.github.com>

Golden the colour along with the words

Every golden of something a person reads was of the plain rendering, and the
colour was covered by two assertions that it existed: renderReportColoured
puts an escape sequence somewhere, and safe-coloured-text drops its colour
when the terminal has none. Neither says which words are picked out. Making
the marker green rather than red, or dropping the styling from the rule text
under it, passed the whole suite.

So the goldens are now of the coloured rendering: the rule goldens, the report
goldens, the dirty example, the two annotation reports, and the two explain
goldens. What a reader of these has to do is read them with something that
interprets the escapes, which is what `cat` does and what a diff viewer will
not.

The plain rendering keeps the one assertion it needs, and it changes direction
with the goldens: ReportSpec used to say the coloured path exists at all, and
now says the plain path stays plain, which is the half that nothing else would
catch once every golden holds escape sequences.

Two comments said the opposite of this on purpose and are rewritten rather
than deleted, since the reason they gave was true when they were written: a
golden full of escape sequences is harder to review, and that is the price
being paid for reviewing the colour at all.

Not goldened in colour: the JSON goldens, which have no colour, and the error
paths that render a rule-set error into an expectationFailure, which are
messages rather than output.

Total

14s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 1m30s 0s 0s 1m31s 1m30s
Eval 1m31s 13s 13s 1m44s 0s
Build 1m37s 0s 6s 1m43s 0s
Suite 1m30s 14s 14s 1m44s 1m30s

Timeline

Config Eval Build Compressed gap
0s1m40s