@@ -16,18 +16,18 @@ Tools
1616
1717 dart pub global activate coverage
1818
19- Consider adding the ` pub global run ` executables directory to your path.
19+ Consider adding the ` dart pub global run` executables directory to your path.
2020See [ Running a script from your PATH] ( https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path )
2121for more details.
2222
2323#### Collecting coverage from the VM
2424
2525```
2626dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN script.dart
27- pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates
27+ dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates
2828```
2929
30- or if the ` pub global run ` executables are on your PATH,
30+ or if the ` dart pub global run` executables are on your PATH,
3131
3232```
3333collect_coverage --uri=http://... -o coverage.json --resume-isolates
@@ -44,10 +44,10 @@ all isolates are paused before collecting coverage.
4444#### Formatting coverage data
4545
4646```
47- pub global run coverage:format_coverage --package=app_package -i coverage.json
47+ dart pub global run coverage:format_coverage --package=app_package -i coverage.json
4848```
4949
50- or if the ` pub global run ` exectuables are on your PATH,
50+ or if the ` dart pub global run` exectuables are on your PATH,
5151
5252```
5353format_coverage --package=app_package -i coverage.json
@@ -70,15 +70,15 @@ collect_coverage:
7070
7171```
7272dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN script.dart
73- pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage
73+ dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage
7474```
7575
7676To gather branch level coverage information, pass ` --branch-coverage ` to * both*
7777collect_coverage and the Dart command you're gathering coverage from:
7878
7979```
8080dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN --branch-coverage script.dart
81- pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --branch-coverage
81+ dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --branch-coverage
8282```
8383
8484Branch coverage requires Dart VM 2.17.0, with service API v3.56. Function,
@@ -87,5 +87,5 @@ those flags:
8787
8888```
8989dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN --branch-coverage script.dart
90- pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage --branch-coverage
90+ dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage --branch-coverage
9191```
0 commit comments