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

Side by Side Diff: test/transformer/exclusion/works_on_dart2js_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub_tests; 5 library pub_tests;
6 6
7 import 'package:scheduled_test/scheduled_stream.dart'; 7 import 'package:scheduled_test/scheduled_stream.dart';
8 import 'package:scheduled_test/scheduled_test.dart'; 8 import 'package:scheduled_test/scheduled_test.dart';
9 9
10 import '../../descriptor.dart' as d; 10 import '../../descriptor.dart' as d;
11 import '../../test_pub.dart'; 11 import '../../test_pub.dart';
12 import '../../serve/utils.dart'; 12 import '../../serve/utils.dart';
13 13
14 main() { 14 main() {
15 integration("works on the dart2js transformer", () { 15 integration("works on the dart2js transformer", () {
16 serveBarback();
17
16 d.dir(appPath, [ 18 d.dir(appPath, [
17 d.pubspec({ 19 d.pubspec({
18 "name": "myapp", 20 "name": "myapp",
19 "transformers": [ 21 "transformers": [
20 { 22 {
21 "\$dart2js": { 23 "\$dart2js": {
22 "\$include": ["web/a.dart", "web/b.dart"], 24 "\$include": ["web/a.dart", "web/b.dart"],
23 "\$exclude": "web/a.dart" 25 "\$exclude": "web/a.dart"
24 } 26 }
25 } 27 }
26 ] 28 ],
29 "dependencies": {"barback": "any"}
27 }), 30 }),
28 d.dir("web", [ 31 d.dir("web", [
29 d.file("a.dart", "void main() => print('hello');"), 32 d.file("a.dart", "void main() => print('hello');"),
30 d.file("b.dart", "void main() => print('hello');"), 33 d.file("b.dart", "void main() => print('hello');"),
31 d.file("c.dart", "void main() => print('hello');") 34 d.file("c.dart", "void main() => print('hello');")
32 ]) 35 ])
33 ]).create(); 36 ]).create();
34 37
35 createLockFile('myapp', pkg: ['barback']); 38 pubGet();
36
37 var server = pubServe(); 39 var server = pubServe();
38 // Dart2js should remain lazy. 40 // Dart2js should remain lazy.
39 server.stdout.expect("Build completed successfully"); 41 server.stdout.expect("Build completed successfully");
40 42
41 requestShould404("a.dart.js"); 43 requestShould404("a.dart.js");
42 requestShouldSucceed("b.dart.js", isNot(isEmpty)); 44 requestShouldSucceed("b.dart.js", isNot(isEmpty));
43 server.stdout.expect(consumeThrough(emitsLines( 45 server.stdout.expect(consumeThrough(emitsLines(
44 "[Info from Dart2JS]:\n" 46 "[Info from Dart2JS]:\n"
45 "Compiling myapp|web/b.dart..."))); 47 "Compiling myapp|web/b.dart...")));
46 server.stdout.expect(consumeThrough("Build completed successfully")); 48 server.stdout.expect(consumeThrough("Build completed successfully"));
47 49
48 requestShould404("c.dart.js"); 50 requestShould404("c.dart.js");
49 endPubServe(); 51 endPubServe();
50 }); 52 });
51 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698