Index: sdk/lib/_internal/pub/test/serve/fails_to_load_an_unconfigurable_transformer_when_config_is_passed_test.dart |
diff --git a/sdk/lib/_internal/pub/test/serve/fails_to_load_a_file_that_defines_no_transforms_test.dart b/sdk/lib/_internal/pub/test/serve/fails_to_load_an_unconfigurable_transformer_when_config_is_passed_test.dart |
similarity index 61% |
copy from sdk/lib/_internal/pub/test/serve/fails_to_load_a_file_that_defines_no_transforms_test.dart |
copy to sdk/lib/_internal/pub/test/serve/fails_to_load_an_unconfigurable_transformer_when_config_is_passed_test.dart |
index a636fcdb344e1a0bfae5252aa102e3402f1ffd17..04036416e457228b69fc509fbbea1b771c4f4bf6 100644 |
--- a/sdk/lib/_internal/pub/test/serve/fails_to_load_a_file_that_defines_no_transforms_test.dart |
+++ b/sdk/lib/_internal/pub/test/serve/fails_to_load_an_unconfigurable_transformer_when_config_is_passed_test.dart |
@@ -8,29 +8,28 @@ import 'package:scheduled_test/scheduled_test.dart'; |
import '../descriptor.dart' as d; |
import '../test_pub.dart'; |
+import 'utils.dart'; |
main() { |
initConfig(); |
- integration("fails to load a file that defines no transforms", () { |
+ integration("fails to load an unconfigurable transformer when config is " |
+ "passed", () { |
d.dir(appPath, [ |
d.pubspec({ |
"name": "myapp", |
- "transformers": ["myapp/transformer"] |
+ "transformers": [{"myapp/src/transformer": {'foo': 'bar'}}] |
}), |
- d.dir("lib", [ |
- d.file("transformer.dart", "library does_nothing;") |
- ]) |
+ d.dir("lib", [d.dir("src", [ |
+ d.file("transformer.dart", REWRITE_TRANSFORMER) |
+ ])]) |
]).create(); |
createLockFile('myapp', pkg: ['barback']); |
var pub = startPub(args: ['serve', '--port=0']); |
- expect(pub.nextErrLine(), completion(startsWith('No transformers were ' |
- 'defined in '))); |
- expect(pub.nextErrLine(), completion(startsWith('required by myapp.'))); |
+ expect(pub.nextErrLine(), completion(startsWith('No transformers that ' |
+ 'accept configuration were defined in '))); |
pub.shouldExit(1); |
- expect(pub.remainingStderr(), |
- completion(isNot(contains('This is an unexpected error')))); |
}); |
} |