| Index: sdk/lib/_internal/pub/test/serve/utils.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/utils.dart b/sdk/lib/_internal/pub/test/serve/utils.dart
|
| index 6c5f1ec0cde0fe120912728ca1175ac97bb7c2c4..46d2a148fea25791f2c46b5f5b4509b150ac0558 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/utils.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/utils.dart
|
| @@ -120,11 +120,13 @@ void endPubServe() {
|
| }
|
|
|
| /// Schedules an HTTP request to the running pub server with [urlPath] and
|
| -/// verifies that it responds with [expected].
|
| -void requestShouldSucceed(String urlPath, String expected) {
|
| +/// verifies that it responds with a body that matches [expectation].
|
| +///
|
| +/// [expectation] may either be a [Matcher] or a string to match an exact body.
|
| +void requestShouldSucceed(String urlPath, expectation) {
|
| schedule(() {
|
| return http.get("http://127.0.0.1:$_port/$urlPath").then((response) {
|
| - expect(response.body, equals(expected));
|
| + expect(response.body, expectation);
|
| });
|
| }, "request $urlPath");
|
| }
|
|
|