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

Unified Diff: test/run/doesnt_load_an_unnecessary_transformer_test.dart

Issue 1523323004: Install barback from a hosted source in all tests. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Merge for real. Created 5 years 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
« no previous file with comments | « test/run/does_not_run_on_transformer_error_test.dart ('k') | test/run/mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/run/doesnt_load_an_unnecessary_transformer_test.dart
diff --git a/test/run/doesnt_load_an_unnecessary_transformer_test.dart b/test/run/doesnt_load_an_unnecessary_transformer_test.dart
index e902bff21ef3226d2663ae7cdf893c2a9c4da6da..d993314addea4df0fe446a8378f04bcbcd02f325 100644
--- a/test/run/doesnt_load_an_unnecessary_transformer_test.dart
+++ b/test/run/doesnt_load_an_unnecessary_transformer_test.dart
@@ -23,30 +23,33 @@ class BrokenTransformer extends Transformer {
""";
main() {
- integration("doesn't load an unnecessary transformer", () {
- d.dir(appPath, [
- d.pubspec({
- "name": "myapp",
- "transformers": [
- {"myapp/src/transformer": {r"$include": "lib/myapp.dart"}}
- ]
- }),
- d.dir("lib", [
- d.file("myapp.dart", ""),
- d.dir("src", [d.file("transformer.dart", TRANSFORMER)])
- ]),
- d.dir("bin", [
- d.file("hi.dart", "void main() => print('Hello!');")
- ])
- ]).create();
-
- createLockFile('myapp', pkg: ['barback']);
-
- // This shouldn't load the transformer, since it doesn't transform
- // anything that the entrypoint imports. If it did load the transformer,
- // we'd know since it would throw an exception.
- var pub = pubRun(args: ["bin/hi"]);
- pub.stdout.expect("Hello!");
- pub.shouldExit();
- });
+ integration("doesn't load an unnecessary transformer", () {
+ serveBarback();
+
+ d.dir(appPath, [
+ d.pubspec({
+ "name": "myapp",
+ "transformers": [
+ {"myapp/src/transformer": {r"$include": "lib/myapp.dart"}}
+ ],
+ "dependencies": {"barback": "any"}
+ }),
+ d.dir("lib", [
+ d.file("myapp.dart", ""),
+ d.dir("src", [d.file("transformer.dart", TRANSFORMER)])
+ ]),
+ d.dir("bin", [
+ d.file("hi.dart", "void main() => print('Hello!');")
+ ])
+ ]).create();
+
+ pubGet();
+
+ // This shouldn't load the transformer, since it doesn't transform
+ // anything that the entrypoint imports. If it did load the transformer,
+ // we'd know since it would throw an exception.
+ var pub = pubRun(args: ["bin/hi"]);
+ pub.stdout.expect("Hello!");
+ pub.shouldExit();
+ });
}
« no previous file with comments | « test/run/does_not_run_on_transformer_error_test.dart ('k') | test/run/mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698