OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import '../descriptor.dart' as d; |
| 3 import '../test_pub.dart'; |
| 4 import 'utils.dart'; |
| 5 main() { |
| 6 initConfig(); |
| 7 integration("does not serve .dart files in release mode", () { |
| 8 d.dir( |
| 9 "foo", |
| 10 [d.libPubspec("foo", "0.0.1"), d.dir("lib", [d.file("foo.dart", """ |
| 11 library foo; |
| 12 foo() => 'foo'; |
| 13 """)])]).create(); |
| 14 d.dir(appPath, [d.appPubspec({ |
| 15 "foo": { |
| 16 "path": "../foo" |
| 17 } |
| 18 }), |
| 19 d.dir("lib", [d.file("lib.dart", "lib() => print('hello');")]), |
| 20 d.dir("web", [d.file("file.dart", """ |
| 21 import 'package:foo/foo.dart'; |
| 22 main() => print('hello'); |
| 23 """), |
| 24 d.dir("sub", [d.file("sub.dart", "main() => 'foo';")])])]).create(); |
| 25 pubServe(shouldGetFirst: true, args: ["--mode", "release"]); |
| 26 requestShould404("file.dart"); |
| 27 requestShould404("packages/myapp/lib.dart"); |
| 28 requestShould404("packages/foo/foo.dart"); |
| 29 requestShould404("sub/sub.dart"); |
| 30 endPubServe(); |
| 31 }); |
| 32 } |
OLD | NEW |