commit | e3008a4c0031460b8d3d916d1135d2d25edd2424 | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Fri Aug 21 18:17:16 2020 -0700 |
committer | GitHub <noreply@github.com> | Fri Aug 21 18:17:16 2020 -0700 |
tree | 507d6e2b24f8c653b8fdd32449b60e7ba7c1e8be | |
parent | 42786e3c654fa942e4ac68fa4acdfcd28c4fe950 [diff] |
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.
This repository contains packages for writing and running Dart tests.
A full featured packaged for writing and running Dart tests on various platforms, e.g. VM, Chrome, Node etc.
A minimal package for writing tests. This package is used by package:test
and package: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
.