OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import '../descriptor.dart' as d; |
| 3 import '../test_pub.dart'; |
| 4 import '../serve/utils.dart'; |
| 5 main() { |
| 6 initConfig(); |
| 7 withBarbackVersions("any", () { |
| 8 integration("runs one third-party transformer on another", () { |
| 9 d.dir("foo", [d.pubspec({ |
| 10 "name": "foo", |
| 11 "version": "1.0.0" |
| 12 }), |
| 13 d.dir("lib", [d.file("transformer.dart", dartTransformer('foo'))])])
.create(); |
| 14 d.dir("bar", [d.pubspec({ |
| 15 "name": "bar", |
| 16 "version": "1.0.0", |
| 17 "transformers": ["foo/transformer"], |
| 18 "dependencies": { |
| 19 "foo": { |
| 20 "path": "../foo" |
| 21 } |
| 22 } |
| 23 }), |
| 24 d.dir("lib", [d.file("transformer.dart", dartTransformer('bar'))])])
.create(); |
| 25 d.dir(appPath, [d.pubspec({ |
| 26 "name": "myapp", |
| 27 "transformers": ["bar/transformer"], |
| 28 "dependencies": { |
| 29 'bar': { |
| 30 'path': '../bar' |
| 31 } |
| 32 } |
| 33 }), |
| 34 d.dir("web", [d.file("main.dart", 'const TOKEN = "main.dart";')])]).
create(); |
| 35 createLockFile('myapp', sandbox: ['foo', 'bar'], pkg: ['barback']); |
| 36 pubServe(); |
| 37 requestShouldSucceed( |
| 38 "main.dart", |
| 39 'const TOKEN = "(main.dart, (bar, foo))";'); |
| 40 endPubServe(); |
| 41 }); |
| 42 }); |
| 43 } |
OLD | NEW |