| Index: sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/missing_asset_test.dart b/sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
|
| similarity index 52%
|
| copy from sdk/lib/_internal/pub/test/serve/missing_asset_test.dart
|
| copy to sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
|
| index 1f69b6c4471db387328852e83ff03d6865ad829b..f2a41351618212582cb755b9de09d6a3a908ef8e 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/missing_asset_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
|
| @@ -6,23 +6,32 @@ library pub_tests;
|
|
|
| import 'dart:io';
|
|
|
| +import 'package:path/path.dart' as path;
|
| +import 'package:scheduled_test/scheduled_test.dart';
|
| +
|
| +import '../../lib/src/io.dart';
|
| import '../descriptor.dart' as d;
|
| import '../test_pub.dart';
|
| import 'utils.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration("responds with a 404 for missing assets", () {
|
| + integration("stop serving a file that is removed", () {
|
| d.dir(appPath, [
|
| - d.appPubspec()
|
| + d.appPubspec(),
|
| + d.dir("web", [
|
| + d.file("index.html", "body")
|
| + ])
|
| ]).create();
|
|
|
| startPubServe();
|
| + requestShouldSucceed("index.html", "body");
|
| +
|
| + schedule(() => deleteEntry(
|
| + path.join(sandboxDir, appPath, "web", "index.html")));
|
| +
|
| + waitForBuildSuccess();
|
| requestShould404("index.html");
|
| - requestShould404("packages/myapp/nope.dart");
|
| - requestShould404("assets/myapp/nope.png");
|
| - requestShould404("dir/packages/myapp/nope.dart");
|
| - requestShould404("dir/assets/myapp/nope.png");
|
| endPubServe();
|
| });
|
| }
|
|
|