Skip to content

Commit 5a2b40d

Browse files
authored
test: add library doc comments (#2586)
1 parent 9594859 commit 5a2b40d

File tree

6 files changed

+34
-1
lines changed

6 files changed

+34
-1
lines changed

pkgs/test/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.29.1-wip
2+
3+
* Add comments to the top-level libraries in the package.
4+
15
## 1.29.0
26

37
* Add `--coverage-package` flag, which filters the coverage report to specific

pkgs/test/lib/expect.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
/// The `expect` API for test assertions.
6+
///
7+
/// This is a re-export of `package:matcher/expect.dart`.
8+
/// Generally you should import `package:test/test.dart` instead.
9+
library;
10+
511
export 'package:matcher/expect.dart';

pkgs/test/lib/fake.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@
66
// so until Mockito stops implementing its own version of `Fake`, because there
77
// is code in the wild that imports both test_api.dart and Mockito.
88

9+
/// The `Fake` class for faking dependencies.
10+
///
11+
/// This is a re-export of `package:test_api/fake.dart`. It is kept separate
12+
/// to avoid a breaking change for users who import `package:mockito` directly.
13+
library;
14+
915
// ignore: deprecated_member_use
1016
export 'package:test_api/fake.dart';

pkgs/test/lib/scaffolding.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
/// The core APIs for defining the structure of a test suite.
6+
///
7+
/// This library avoids exports of the `package:matcher` APIs from
8+
/// `package:test/expect.dart` and can be used with alternative expectation
9+
/// frameworks like `package:checks`.
10+
library;
11+
512
export 'package:test_core/src/scaffolding.dart';

pkgs/test/lib/test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
/// The main test library.
6+
///
7+
/// This library exports the core test APIs, including `test()`, `group()`,
8+
/// `setUp()`, `tearDown()`, and `expect()`.
9+
///
10+
/// This is the recommended import for most test files.
11+
/// If you want to use `package:checks` for assertions, import
12+
/// `package:test/scaffolding.dart` instead.
13+
library;
14+
515
export 'package:matcher/expect.dart';
616
// Deprecated exports not surfaced through focused libraries.
717
// ignore: deprecated_member_use

pkgs/test/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 1.29.0
2+
version: 1.29.1-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)