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 a third-party transformer on a local transformer", () { |
| 9 d.dir( |
| 10 "foo", |
| 11 [ |
| 12 d.libPubspec("foo", '1.0.0'), |
| 13 d.dir("lib", [d.file("transformer.dart", dartTransformer('foo'))])
]).create(); |
| 14 d.dir(appPath, [d.pubspec({ |
| 15 "name": "myapp", |
| 16 "transformers": ["foo/transformer", "myapp/transformer"], |
| 17 "dependencies": { |
| 18 "foo": { |
| 19 "path": "../foo" |
| 20 } |
| 21 } |
| 22 }), |
| 23 d.dir("lib", [d.file("transformer.dart", dartTransformer('myapp'))])
, |
| 24 d.dir("web", [d.file("main.dart", 'const TOKEN = "main.dart";')])]).
create(); |
| 25 createLockFile('myapp', sandbox: ['foo'], pkg: ['barback']); |
| 26 pubServe(); |
| 27 requestShouldSucceed( |
| 28 "main.dart", |
| 29 'const TOKEN = "((main.dart, foo), (myapp, foo))";'); |
| 30 endPubServe(); |
| 31 }); |
| 32 }); |
| 33 } |
OLD | NEW |