diff --git a/pkgs/test/CHANGELOG.md b/pkgs/test/CHANGELOG.md index 8940bd9b5..c84450720 100644 --- a/pkgs/test/CHANGELOG.md +++ b/pkgs/test/CHANGELOG.md @@ -1,5 +1,7 @@ ## 1.25.1-wip +* Document the silent reporter in CLI help output. + ## 1.25.0 * Handle paths with leading `/` when spawning test isolates. diff --git a/pkgs/test/test/runner/runner_test.dart b/pkgs/test/test/runner/runner_test.dart index 7e34199c8..dde3d049e 100644 --- a/pkgs/test/test/runner/runner_test.dart +++ b/pkgs/test/test/runner/runner_test.dart @@ -110,6 +110,7 @@ Output: [expanded] (default) A separate line for each update. [github] A custom reporter for GitHub Actions (the default reporter when running on GitHub Actions). [json] A machine-readable format (see https://dart.dev/go/test-docs/json_reporter.md). + [silent] A reporter with no output. May be useful when only the exit code is meaningful. --file-reporter Enable an additional reporter writing test results to a file. Should be in the form :, Example: "json:reports/tests.json" diff --git a/pkgs/test_core/CHANGELOG.md b/pkgs/test_core/CHANGELOG.md index c9715f7f6..e01141f6a 100644 --- a/pkgs/test_core/CHANGELOG.md +++ b/pkgs/test_core/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.6.1-wip -- Handle missing package configs. +* Handle missing package configs. +* Document the silent reporter in CLI help output. ## 0.6.0 diff --git a/pkgs/test_core/lib/src/runner/configuration/args.dart b/pkgs/test_core/lib/src/runner/configuration/args.dart index 35a75650f..e981bedc3 100644 --- a/pkgs/test_core/lib/src/runner/configuration/args.dart +++ b/pkgs/test_core/lib/src/runner/configuration/args.dart @@ -139,7 +139,7 @@ final ArgParser _parser = (() { var reporterDescriptions = { for (final MapEntry(:key, :value) in allReporters.entries) - if (!value.hidden) key: value.description + key: value.description }; parser.addSeparator('Output:'); diff --git a/pkgs/test_core/lib/src/runner/configuration/reporters.dart b/pkgs/test_core/lib/src/runner/configuration/reporters.dart index 271597e2e..a79912f87 100644 --- a/pkgs/test_core/lib/src/runner/configuration/reporters.dart +++ b/pkgs/test_core/lib/src/runner/configuration/reporters.dart @@ -22,8 +22,7 @@ typedef ReporterFactory = Reporter Function(Configuration, Engine, StringSink); class ReporterDetails { final String description; final ReporterFactory factory; - final bool hidden; - ReporterDetails(this.description, this.factory, {this.hidden = false}); + ReporterDetails(this.description, this.factory); } /// All reporters and their corresponding details. @@ -48,7 +47,8 @@ final _allReporters = { printPlatform: config.suiteDefaults.runtimes.length > 1 || config.suiteDefaults.compilerSelections != null)), 'github': ReporterDetails( - 'A custom reporter for GitHub Actions (the default reporter when running on GitHub Actions).', + 'A custom reporter for GitHub Actions ' + '(the default reporter when running on GitHub Actions).', (config, engine, sink) => GithubReporter.watch(engine, sink, printPath: config.testSelections.length > 1 || Directory(config.testSelections.keys.single).existsSync(), @@ -60,8 +60,8 @@ final _allReporters = { (config, engine, sink) => JsonReporter.watch(engine, sink, isDebugRun: config.debug)), 'silent': ReporterDetails( - hidden: true, - 'A reporter with no output.', + 'A reporter with no output. ' + 'May be useful when only the exit code is meaningful.', (config, engine, sink) => SilentReporter()), };