| Index: sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart
|
| deleted file mode 100644
|
| index 7bae48e6bbf1285b19e7bef1d2f5804da29377d0..0000000000000000000000000000000000000000
|
| --- a/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart
|
| +++ /dev/null
|
| @@ -1,55 +0,0 @@
|
| -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -library pub_tests;
|
| -
|
| -import 'package:scheduled_test/scheduled_test.dart';
|
| -import '../../descriptor.dart' as d;
|
| -import '../../test_pub.dart';
|
| -import '../utils.dart';
|
| -
|
| -main() {
|
| - initConfig();
|
| - integration("handles bad commands", () {
|
| - d.dir(appPath, [
|
| - d.appPubspec()
|
| - ]).create();
|
| -
|
| - pubServe();
|
| -
|
| - webSocketShouldReply(
|
| - "not even valid json",
|
| - equals({"error": '"not even valid json" is not valid JSON: '
|
| - 'Unexpected character at 0: \'not even valid json\''}),
|
| - encodeRequest: false);
|
| -
|
| - webSocketShouldReply(
|
| - {"command": "wat"},
|
| - equals({"error": 'Unknown command "wat".'}));
|
| -
|
| - webSocketShouldReply(
|
| - ["not", "a", "map"],
|
| - equals({"error": 'Command must be a JSON map. '
|
| - 'Got: ["not","a","map"].'}));
|
| -
|
| - webSocketShouldReply(
|
| - {"wat": "there's no command"},
|
| - equals({"error": 'Missing command name. '
|
| - 'Got: {"wat":"there\'s no command"}.'}));
|
| -
|
| - webSocketShouldReply(
|
| - {"command": "urlToAsset", "path": 123},
|
| - equals({"error": '"path" must be a string. Got: 123.'}));
|
| -
|
| - webSocketShouldReply(
|
| - {"command": "assetToUrl", "package": 123, "path": "index.html"},
|
| - equals({"error": '"package" must be a string. Got: 123.'}));
|
| -
|
| - webSocketShouldReply(
|
| - {"command": "assetToUrl", "package": "foo", "path": 123},
|
| - equals({"error": '"path" must be a string. Got: 123.'}));
|
| -
|
| - endPubServe();
|
| - });
|
| -}
|
|
|