OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import 'package:path/path.dart' as path; |
| 3 import 'package:scheduled_test/scheduled_test.dart'; |
| 4 import '../../lib/src/io.dart'; |
| 5 import '../descriptor.dart' as d; |
| 6 import '../test_pub.dart'; |
| 7 import 'utils.dart'; |
| 8 main() { |
| 9 initConfig(); |
| 10 integration("responds with a 404 for missing source files", () { |
| 11 d.dir( |
| 12 appPath, |
| 13 [ |
| 14 d.appPubspec(), |
| 15 d.dir("lib", [d.file("nope.dart", "nope")]), |
| 16 d.dir("web", [d.file("index.html", "<body>")])]).create(); |
| 17 pubServe(); |
| 18 schedule(() { |
| 19 deleteEntry(path.join(sandboxDir, appPath, "lib", "nope.dart")); |
| 20 deleteEntry(path.join(sandboxDir, appPath, "web", "index.html")); |
| 21 }, "delete files"); |
| 22 requestShould404("index.html"); |
| 23 requestShould404("packages/myapp/nope.dart"); |
| 24 requestShould404("dir/packages/myapp/nope.dart"); |
| 25 endPubServe(); |
| 26 }); |
| 27 } |
OLD | NEW |