Skip to content

Commit b982692

Browse files
authored
docs: README updates (#4)
1 parent 10336d2 commit b982692

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,31 @@ Developed with 💙 by [Very Good Ventures][very_good_ventures_link] 🦄
1111
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
1212
[![License: MIT][license_badge]][license_link]
1313

14-
A test runner for Flutter and Dart created by Very Good Ventures.
14+
A test runner for Flutter and Dart created by Very Good Ventures. This package is intended to be used when writing custom tooling that runs Flutter or Dart tests and exposes a Stream of `TestEvent` instances. For more information about the various `TestEvent` types, refer to the [JSON Reporter Test Protocol][json_reporter_test_protocol_link].
1515

1616
## Usage
1717

1818
```dart
1919
import 'package:very_good_test_runner/very_good_test_runner.dart';
2020
2121
void main() {
22-
// Run `dart test` in `path/to/project`.
23-
dartTest(workingDirectory: 'path/to/project').listen((TestEvent event) {
22+
const arguments = ['--coverage'];
23+
const workingDirectory = 'path/to/project';
24+
25+
// Run `dart test` process.
26+
dartTest(
27+
arguments: arguments,
28+
workingDirectory: workingDirectory,
29+
).listen((TestEvent event) {
2430
// React to `TestEvent` instances.
2531
print(event);
2632
});
2733
28-
// Run `flutter test` in `path/to/project`.
29-
flutterTest(workingDirectory: 'path/to/project').listen((TestEvent event) {
34+
// Run `flutter test` process.
35+
flutterTest(
36+
arguments: arguments,
37+
workingDirectory: workingDirectory,
38+
).listen((TestEvent event) {
3039
// React to `TestEvent` instances.
3140
print(event);
3241
});
@@ -36,6 +45,7 @@ void main() {
3645
[ci_badge]: https://github.com/VeryGoodOpenSource/very_good_test_runner/workflows/very_good_test_runner/badge.svg
3746
[ci_link]: https://github.com/VeryGoodOpenSource/very_good_test_runner/actions
3847
[coverage_badge]: https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_test_runner/main/coverage_badge.svg
48+
[json_reporter_test_protocol_link]: https://github.com/dart-lang/test/blob/master/pkgs/test/doc/json_reporter.md
3949
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
4050
[license_link]: https://opensource.org/licenses/MIT
4151
[logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only

0 commit comments

Comments
 (0)