Skip to content
Merged
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
4 changes: 4 additions & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.29.1-wip

* Add comments to the top-level libraries in the package.

## 1.29.0

* Add `--coverage-package` flag, which filters the coverage report to specific
Expand Down
6 changes: 6 additions & 0 deletions pkgs/test/lib/expect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// The `expect` API for test assertions.
///
/// This is a re-export of `package:matcher/expect.dart`.
/// Generally you should import `package:test/test.dart` instead.
library;

export 'package:matcher/expect.dart';
6 changes: 6 additions & 0 deletions pkgs/test/lib/fake.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
// so until Mockito stops implementing its own version of `Fake`, because there
// is code in the wild that imports both test_api.dart and Mockito.

/// The `Fake` class for faking dependencies.
///
/// This is a re-export of `package:test_api/fake.dart`. It is kept separate
/// to avoid a breaking change for users who import `package:mockito` directly.
Comment on lines +11 to +12
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is worth documenting. The test_api library is not user facing so it's not worth mentioning in user facing docs. The history of it's landing in the test package isn't really interesting for users either. I'm not convinced we'd want to necessarily export Fake from test/teat outside of Mockito considerations, but I agree it's the case that would fit in more with the existing library design.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the publicly visible, generated API docs. It's better than having folks guess!

library;

// ignore: deprecated_member_use
export 'package:test_api/fake.dart';
7 changes: 7 additions & 0 deletions pkgs/test/lib/scaffolding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// The core APIs for defining the structure of a test suite.
///
/// This library avoids exports of the `package:matcher` APIs from
/// `package:test/expect.dart` and can be used with alternative expectation
/// frameworks like `package:checks`.
library;

export 'package:test_core/src/scaffolding.dart';
10 changes: 10 additions & 0 deletions pkgs/test/lib/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// The main test library.
///
/// This library exports the core test APIs, including `test()`, `group()`,
/// `setUp()`, `tearDown()`, and `expect()`.
///
/// This is the recommended import for most test files.
/// If you want to use `package:checks` for assertions, import
/// `package:test/scaffolding.dart` instead.
library;

export 'package:matcher/expect.dart';
// Deprecated exports not surfaced through focused libraries.
// ignore: deprecated_member_use
Expand Down
2 changes: 1 addition & 1 deletion pkgs/test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test
version: 1.29.0
version: 1.29.1-wip
description: >-
A full featured library for writing and running Dart tests across platforms.
repository: https://github.com/dart-lang/test/tree/master/pkgs/test
Expand Down
Loading