Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Unified Diff: sdk/lib/_internal/pub/test/serve/fails_to_load_an_unconfigurable_transformer_when_config_is_passed_test.dart

Issue 23522029: Support passing configuration data to a transformer plugin. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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'))));
});
}

Powered by Google App Engine
This is Rietveld 408576698