| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import '../descriptor.dart' as d; | |
| 6 import '../test_pub.dart'; | |
| 7 import '../serve/utils.dart'; | |
| 8 | |
| 9 main() { | |
| 10 initConfig(); | |
| 11 // Regression test for issue 23480 | |
| 12 integration("ignores a transformer on test files in a dependency", () { | |
| 13 servePackages((builder) { | |
| 14 builder.serveRepoPackage('barback'); | |
| 15 | |
| 16 builder.serve("bar", "1.2.3", contents: [ | |
| 17 d.dir("lib", [ | |
| 18 // Make this invalid so that if it does get loaded, pub will | |
| 19 // definitely throw an error. | |
| 20 d.file("bar.dart", "{invalid Dart code)") | |
| 21 ]) | |
| 22 ]); | |
| 23 | |
| 24 builder.serve("foo", "1.2.3", | |
| 25 pubspec: { | |
| 26 "name": "foo", | |
| 27 "version": "1.0.0", | |
| 28 "dev_dependencies": { | |
| 29 "bar": "any" | |
| 30 }, | |
| 31 "transformers": [{ | |
| 32 "bar": {"\$include": "test/**"} | |
| 33 }] | |
| 34 }, contents: [ | |
| 35 d.dir("test", [ | |
| 36 d.file("my_test.dart", "void main() {}") | |
| 37 ]) | |
| 38 ]); | |
| 39 }); | |
| 40 | |
| 41 d.dir(appPath, [ | |
| 42 d.pubspec({ | |
| 43 "name": "myapp", | |
| 44 "dependencies": {"foo": "any"} | |
| 45 }), | |
| 46 d.dir("web", [ | |
| 47 d.file("foo.txt", "foo") | |
| 48 ]) | |
| 49 ]).create(); | |
| 50 | |
| 51 pubGet(); | |
| 52 | |
| 53 pubServe(); | |
| 54 requestShouldSucceed("foo.txt", "foo"); | |
| 55 endPubServe(); | |
| 56 }); | |
| 57 } | |
| OLD | NEW |