OLD | NEW |
(Empty) | |
| 1 import 'package:scheduled_test/scheduled_test.dart'; |
| 2 import '../descriptor.dart' as d; |
| 3 import '../test_pub.dart'; |
| 4 import '../serve/utils.dart'; |
| 5 main() { |
| 6 initConfig(); |
| 7 integration("handles imports in the Dart code", () { |
| 8 d.dir( |
| 9 "foo", |
| 10 [d.libPubspec("foo", "0.0.1"), d.dir("lib", [d.file("foo.dart", """ |
| 11 library foo; |
| 12 foo() => 'footext'; |
| 13 """)])]).create(); |
| 14 d.dir(appPath, [d.appPubspec({ |
| 15 "foo": { |
| 16 "path": "../foo" |
| 17 } |
| 18 }), d.dir("lib", [d.file("lib.dart", """ |
| 19 library lib; |
| 20 lib() => 'libtext'; |
| 21 """)]), d.dir("web", [d.file("main.dart", """ |
| 22 import 'package:foo/foo.dart'; |
| 23 import 'package:myapp/lib.dart'; |
| 24 void main() { |
| 25 print(foo()); |
| 26 print(lib()); |
| 27 } |
| 28 """)])]).create(); |
| 29 pubServe(shouldGetFirst: true); |
| 30 requestShouldSucceed("main.dart.js", contains("footext")); |
| 31 requestShouldSucceed("main.dart.js", contains("libtext")); |
| 32 endPubServe(); |
| 33 }); |
| 34 } |
OLD | NEW |