Index: sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart |
diff --git a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart |
similarity index 52% |
copy from sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart |
copy to sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart |
index c2275bbc16d16fe6c8788301726fb701447806e9..12bc06f3a223be9a86d55993e13058c8e7fc025f 100644 |
--- a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart |
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart |
@@ -5,23 +5,33 @@ |
library pub_tests; |
import 'package:scheduled_test/scheduled_test.dart'; |
- |
-import '../../../lib/src/exit_codes.dart' as exit_codes; |
- |
import '../../descriptor.dart' as d; |
import '../../test_pub.dart'; |
import '../utils.dart'; |
main() { |
initConfig(); |
- integration("throws an error if custom roots don't exist", () { |
+ integration("assetIdToUrls provides output line if given source", () { |
d.dir(appPath, [ |
d.appPubspec(), |
- d.dir("baz") |
+ d.dir("web", [ |
+ d.file("main.dart", "main"), |
+ ]) |
]).create(); |
- var server = startPubServe(args: ["foo", "bar", "baz"]); |
- server.stderr.expect('Directories "bar" and "foo" don\'t exist.'); |
- server.shouldExit(exit_codes.USAGE); |
+ pubServe(); |
+ |
+ schedule(() { |
+ expectWebSocketCall({ |
+ "command": "assetIdToUrls", |
+ "path": "web/main.dart", |
+ "line": 12345 |
+ }, replyEquals: { |
+ "urls": [getServerUrl("web", "main.dart")], |
+ "line": 12345 |
+ }); |
+ }); |
+ |
+ endPubServe(); |
}); |
} |