Normalize Compact and Expanded reporters (#1325)

Working towards #1311

The `Compact` and `Expanded` reporters have a lot of code in common,
along with many superficial, and a few not-superficial differences. Some
of the impactful differences look like they may be bugs. Make it easier
to understand both reporters and their differences by reducing the
superficial changes.

The JSON reporter shares less code with the others, but aim for a
consistent field ordering there as well.

- Avoid using `Configuration.current` from the compact reporter. This
  was never added in the expanded reporter to avoid a transitive import
  to `dart:io`. The pattern of being configured at construction is
  already baked in to the `ReporterFactory` typedef as is a more clear
  pattern than reading from a magic zone scoped variable. Add required
  constructor args for the compact reporter which match those in the
  expanded reporter. Remove the TODO.
- Use the same pattern for setting the color escape code fields. In the
  future we will likely want to migrate to `package:io` for these.
- Shuffle some fields so they are ordered consistently in both
  reporters.
- Add a default for `_lastProgressPassed` to avoid making it nullable.
- Add `_printPath` and `_printPlatform` fields in the compact reporter
  rather than read them lazily through the zone scoped configuration.
- Make the arguments required for the constructors instead of adding
  defaults which are never used.
- Use 2 slashs for comments.
4 files changed
tree: 507d6e2b24f8c653b8fdd32449b60e7ba7c1e8be
  1. pkgs/
  2. tool/
  3. .gitignore
  4. .travis.yml
  5. analysis_options.yaml
  6. CONTRIBUTING.md
  7. mono_repo.yaml
  8. README.md
README.md

Test Mono Repository

This repository contains packages for writing and running Dart tests.

test

A full featured packaged for writing and running Dart tests on various platforms, e.g. VM, Chrome, Node etc.

test_api

A minimal package for writing tests. This package is used by package:test and package:test_core.

test_core

A minimal package for writing and running tests. It also contains extensions for implementing a custom test runner. This package is used by package:test.