| Index: sdk/lib/_internal/pub/test/serve/fails_to_load_a_pubspec_with_reserved_transformer_config_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/fails_to_load_a_transform_with_a_syntax_error_test.dart b/sdk/lib/_internal/pub/test/serve/fails_to_load_a_pubspec_with_reserved_transformer_config_test.dart
|
| similarity index 57%
|
| copy from sdk/lib/_internal/pub/test/serve/fails_to_load_a_transform_with_a_syntax_error_test.dart
|
| copy to sdk/lib/_internal/pub/test/serve/fails_to_load_a_pubspec_with_reserved_transformer_config_test.dart
|
| index b9b3073dd622a659a051c7039842035dd98f1f18..5ba03d8353992149139f163dcd1ecf6cc99b0c02 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/fails_to_load_a_transform_with_a_syntax_error_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/fails_to_load_a_pubspec_with_reserved_transformer_config_test.dart
|
| @@ -8,29 +8,29 @@ import 'package:scheduled_test/scheduled_test.dart';
|
|
|
| import '../descriptor.dart' as d;
|
| import '../test_pub.dart';
|
| +import 'utils.dart';
|
|
|
| main() {
|
| initConfig();
|
|
|
| - // A syntax error will cause the analyzer to fail to parse the transformer
|
| - // when attempting to rewrite its imports.
|
| - integration("fails to load a transform with a syntax error", () {
|
| + integration("fails to load a pubspec with reserved transformer config", () {
|
| d.dir(appPath, [
|
| d.pubspec({
|
| "name": "myapp",
|
| - "transformers": ["myapp/src/transformer"]
|
| + "transformers": [{"myapp/src/transformer": {'include': 'something'}}]
|
| }),
|
| d.dir("lib", [d.dir("src", [
|
| - d.file("transformer.dart", "syntax error")
|
| + d.file("transformer.dart", REWRITE_TRANSFORMER)
|
| ])])
|
| ]).create();
|
|
|
| createLockFile('myapp', pkg: ['barback']);
|
|
|
| var pub = startPub(args: ['serve', '--port=0']);
|
| - expect(pub.nextErrLine(), completion(startsWith('Error on line')));
|
| + expect(pub.nextErrLine(), completion(startsWith('Could not parse ')));
|
| + expect(pub.nextErrLine(), completion(equals('Configuration for '
|
| + 'transformer myapp/src/transformer may not include reserved key '
|
| + '"include".')));
|
| pub.shouldExit(1);
|
| - expect(pub.remainingStderr(),
|
| - completion(isNot(contains('This is an unexpected error'))));
|
| });
|
| }
|
|
|