Skip to content

Commit b7fa27d

Browse files
authored
Point README links to the test library (#2219)
Closes #2218 These links were to the defining library, which can change without a user visible breaking change or major version bump. Link instead to the `package:test/test.dart` library docs for all APIs. The export makes the dartdoc links work, and these are more stable since they are user facing and will only change in a major version release.
1 parent d1e2767 commit b7fa27d

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

pkgs/test/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.25.6-wip
2+
3+
* Point API doc links to `package:test` canonical libraries.
4+
15
## 1.25.5
26

37
* Update the `package:web_socket_channel` version constraint to allow `3.x`.

pkgs/test/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
Tests are specified using the top-level [`test()`] function.
3838
Test asserts can be made using [`expect` from `package:matcher`][expect]
3939

40-
[`test()`]: https://pub.dev/documentation/test_core/latest/test_core.scaffolding/test.html
40+
[`test()`]: https://pub.dev/documentation/test/latest/test/test.html
4141

4242
[expect]: https://pub.dev/documentation/matcher/latest/expect/expect.html
4343

@@ -60,7 +60,7 @@ void main() {
6060
Tests can be grouped together using the [`group()`] function. Each group's
6161
description is added to the beginning of its test's descriptions.
6262

63-
[`group()`]: https://pub.dev/documentation/test_core/latest/test_core.scaffolding/group.html
63+
[`group()`]: https://pub.dev/documentation/test/latest/test/group.html
6464

6565
```dart
6666
import 'package:test/test.dart';
@@ -116,9 +116,9 @@ void main() {
116116
}
117117
```
118118

119-
[`setUp()`]: https://pub.dev/documentation/test_core/latest/test_core.scaffolding/setUp.html
119+
[`setUp()`]: https://pub.dev/documentation/test/latest/test/setUp.html
120120

121-
[`tearDown()`]: https://pub.dev/documentation/test_core/latest/test_core.scaffolding/tearDown.html
121+
[`tearDown()`]: https://pub.dev/documentation/test/latest/test/tearDown.html
122122

123123
## Running Tests
124124

@@ -317,7 +317,7 @@ void main() {
317317
}
318318
```
319319

320-
[`@TestOn`]: https://pub.dev/documentation/test_api/latest/test_api.scaffolding/TestOn-class.html
320+
[`@TestOn`]: https://pub.dev/documentation/test/latest/test/TestOn-class.html
321321

322322
The string you pass to `@TestOn` is what's called a "platform selector", and it
323323
specifies exactly which platforms a test can run on. It can be as simple as the
@@ -776,9 +776,9 @@ The only difference is where the code from the isolate comes from:
776776
`spawnHybridUri()` takes a URL. They both return a [`StreamChannel`] that
777777
communicates with the hybrid isolate. For example:
778778

779-
[`spawnHybridCode()`]: https://pub.dev/documentation/test_api/latest/test_api.scaffolding/spawnHybridCode.html
779+
[`spawnHybridCode()`]: https://pub.dev/documentation/test/latest/test/spawnHybridCode.html
780780

781-
[`spawnHybridUri()`]: https://pub.dev/documentation/test_api/latest/test_api.scaffolding/spawnHybridUri.html
781+
[`spawnHybridUri()`]: https://pub.dev/documentation/test/latest/test/spawnHybridUri.html
782782

783783
[dart:isolate]: https://api.dart.dev/stable/dart-isolate/dart-isolate-library.html
784784

pkgs/test/doc/architecture.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ thought of as frontend functions as well.
2929

3030
The frontend communicates with the backend using zone-scoped getters.
3131
[`Invoker.current`][Invoker] provides access to the current test case to
32-
built-in matchers like [`completion()`][completion], for example to control when
32+
matchers like [`completion()`][completion], for example to control when
3333
it completes. Structural functions use [`Declarer.current`][Declarer] to
3434
gradually build up an in-memory representation of a test suite. The runner is in
3535
charge of setting up these variables, but the frontend never communicates with
3636
the runner directly.
3737

3838
[Invoker]: https://github.com/dart-lang/test/blob/master/lib/src/backend/invoker.dart
39-
[completion]: https://pub.dev/documentation/test_api/latest/test_api/completion.html
39+
[completion]: https://pub.dev/documentation/matcher/latest/expect/completion.html
4040
[Declarer]: https://github.com/dart-lang/test/blob/master/lib/src/backend/declarer.dart
4141

4242
### Backend

pkgs/test/doc/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ This field controls whether or not tests are skipped. It's usually applied to
149149
`skip` parameter for [`test()`][test], it can either be a boolean indicating
150150
whether the tests are skipped or a string indicating the reason they're skipped.
151151

152-
[test]: https://pub.dev/documentation/test_api/latest/test_api/test.html
152+
[test]: https://pub.dev/documentation/test/latest/test/test.html
153153

154154
```yaml
155155
tags:

pkgs/test/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 1.25.5
2+
version: 1.25.6-wip
33
description: >-
44
A full featured library for writing and running Dart tests across platforms.
55
repository: https://github.com/dart-lang/test/tree/master/pkgs/test

0 commit comments

Comments
 (0)