OLD | NEW |
(Empty) | |
| 1 import 'descriptor.dart' as d; |
| 2 import 'test_pub.dart'; |
| 3 main() { |
| 4 initConfig(); |
| 5 integration("includes root package's dev dependencies", () { |
| 6 d.dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create(); |
| 7 d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')]).create(); |
| 8 d.dir(appPath, [d.pubspec({ |
| 9 "name": "myapp", |
| 10 "dev_dependencies": { |
| 11 "foo": { |
| 12 "path": "../foo" |
| 13 }, |
| 14 "bar": { |
| 15 "path": "../bar" |
| 16 } |
| 17 } |
| 18 })]).create(); |
| 19 pubGet(); |
| 20 d.dir( |
| 21 packagesPath, |
| 22 [ |
| 23 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]), |
| 24 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')])]).validate(); |
| 25 }); |
| 26 integration("includes dev dependency's transitive dependencies", () { |
| 27 d.dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1', deps: { |
| 28 "bar": { |
| 29 "path": "../bar" |
| 30 } |
| 31 })]).create(); |
| 32 d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')]).create(); |
| 33 d.dir(appPath, [d.pubspec({ |
| 34 "name": "myapp", |
| 35 "dev_dependencies": { |
| 36 "foo": { |
| 37 "path": "../foo" |
| 38 } |
| 39 } |
| 40 })]).create(); |
| 41 pubGet(); |
| 42 d.dir( |
| 43 packagesPath, |
| 44 [ |
| 45 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]), |
| 46 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')])]).validate(); |
| 47 }); |
| 48 integration("ignores transitive dependency's dev dependencies", () { |
| 49 d.dir('foo', [d.libDir('foo'), d.pubspec({ |
| 50 "name": "foo", |
| 51 "version": "0.0.1", |
| 52 "dev_dependencies": { |
| 53 "bar": { |
| 54 "path": "../bar" |
| 55 } |
| 56 } |
| 57 })]).create(); |
| 58 d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')]).create(); |
| 59 d.dir(appPath, [d.appPubspec({ |
| 60 "foo": { |
| 61 "path": "../foo" |
| 62 } |
| 63 })]).create(); |
| 64 pubGet(); |
| 65 d.dir( |
| 66 packagesPath, |
| 67 [ |
| 68 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]), |
| 69 d.nothing("bar")]).validate(); |
| 70 }); |
| 71 } |
OLD | NEW |