Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
sdk: ${{ matrix.sdk }}

- run: dart pub get
- run: dart pub run test -j1
- run: dart test -j1
4 changes: 2 additions & 2 deletions pkgs/coverage/test/test_with_coverage_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ dependency_overrides:

test('dart pub global run coverage:test_with_coverage', () async {
final globalPub =
await _run(['pub', 'global', 'activate', '-s', 'path', _pkgDir]);
await _run(['dart', 'pub', 'global', 'activate', '-s', 'path', _pkgDir]);
await globalPub.shouldExit(0);

await _runTest(
['pub', 'global', 'run', 'coverage:test_with_coverage'],
['dart', 'pub', 'global', 'run', 'coverage:test_with_coverage'],
);
});

Expand Down
6 changes: 3 additions & 3 deletions pkgs/markdown/benchmark/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ void main() {

## Running Tests

A single test file can be run just using `dart run test path/to/test.dart`.
A single test file can be run just using `dart test path/to/test.dart`.

Many tests can be run at a time using `dart run test path/to/dir`.
Many tests can be run at a time using `dart test path/to/dir`.

It's also possible to run a test on the Dart VM only by invoking it using `dart
path/to/test.dart`, but this doesn't load the full test runner and will be
Expand All @@ -98,7 +98,7 @@ file. If you don't pass any paths, it will run all the test files in your
`test/` directory, making it easy to test your entire application at once.

By default, tests are run in the Dart VM, but you can run them in the browser as
well by passing `dart run test -p chrome path/to/test.dart`.
well by passing `dart test -p chrome path/to/test.dart`.
`test` will take care of starting the browser and loading the tests, and all
the results will be reported on the command line just like for VM tests. In
fact, you can even run tests on both platforms with a single command: `dart run
Expand Down
10 changes: 5 additions & 5 deletions pkgs/markdown/benchmark/output.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ <h1>Real-world sample</h1>
}
</code></pre>
<h2>Running Tests</h2>
<p>A single test file can be run just using <code>pub run test:test path/to/test.dart</code>
(on Dart 1.10, this can be shortened to <code>pub run test path/to/test.dart</code>).</p>
<p>A single test file can be run just using <code>dart test:test path/to/test.dart</code>
(on Dart 1.10, this can be shortened to <code>dart test path/to/test.dart</code>).</p>
<p><img src="https://raw.githubusercontent.com/dart-lang/test/master/image/test1.gif" alt="Single file being run via pub run&quot;" /></p>
<p>Many tests can be run at a time using <code>pub run test:test path/to/dir</code>.</p>
<p>Many tests can be run at a time using <code>dart test:test path/to/dir</code>.</p>
<p><img src="https://raw.githubusercontent.com/dart-lang/test/master/image/test2.gif" alt="Directory being run via &quot;pub run&quot;." /></p>
<p>It's also possible to run a test on the Dart VM only by invoking it using <code>dart path/to/test.dart</code>, but this doesn't load the full test runner and will be
missing some features.</p>
<p>The test runner considers any file that ends with <code>_test.dart</code> to be a test
file. If you don't pass any paths, it will run all the test files in your
<code>test/</code> directory, making it easy to test your entire application at once.</p>
<p>By default, tests are run in the Dart VM, but you can run them in the browser as
well by passing <code>pub run test:test -p chrome path/to/test.dart</code>.
well by passing <code>dart test:test -p chrome path/to/test.dart</code>.
<code>test</code> will take care of starting the browser and loading the tests, and all
the results will be reported on the command line just like for VM tests. In
fact, you can even run tests on both platforms with a single command: <code>pub run test:test -p &quot;chrome,vm&quot; path/to/test.dart</code>.</p>
fact, you can even run tests on both platforms with a single command: <code>dart test:test -p &quot;chrome,vm&quot; path/to/test.dart</code>.</p>
<h3>Restricting Tests to Certain Platforms</h3>
<p>Some test files only make sense to run on particular platforms. They may use
<code>dart:html</code> or <code>dart:io</code>, they might test Windows' particular filesystem
Expand Down
2 changes: 1 addition & 1 deletion pkgs/pubspec_parse/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Read about `build.yaml` at https://pub.dev/packages/build_config
# To update generated code, run `pub run build_runner build`
# To update generated code, run `dart run build_runner build`
targets:
$default:
builders:
Expand Down
2 changes: 1 addition & 1 deletion pkgs/timing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ print('${tracker.duration} ${tracker.innerDuration} ${tracker.slices}');
Use the following command to re-generate `lib/src/timing.g.dart` file:

```bash
dart pub run build_runner build
dart run build_runner build
```

## Publishing automation
Expand Down
2 changes: 1 addition & 1 deletion pkgs/yaml_edit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Testing is done in two strategies: Unit testing (`/test/editor_test.dart`) and
Golden testing (`/test/golden_test.dart`). More information on Golden testing
and the input/output format can be found at `/test/testdata/README.md`.

These tests are automatically run with `pub run test`.
These tests are automatically run with `dart test`.

## Limitations

Expand Down
4 changes: 2 additions & 2 deletions pkgs/yaml_edit/test/testdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ When the tests are run (see [Running Tests](#Running-Tests)), the series of spec

## Running Tests

By default, golden testing is performed with `pub run test`. If we only wanted to
performed golden testing, simply do: `pub run test test/golden_test.dart`.
By default, golden testing is performed with `dart test`. If we only wanted to
performed golden testing, simply do: `dart test test/golden_test.dart`.

## Input Format

Expand Down
Loading