diff --git a/lib/src/command_deploy.dart b/lib/src/command_deploy.dart
index 94decb64df63846d96829362226a77ce8264b861..edd281880dcdee64e2f3fbe56425ff9bf7c51c9d 100644
--- a/lib/src/command_deploy.dart
+++ b/lib/src/command_deploy.dart
@@ -136,6 +136,6 @@ class DeployCommand extends PubCommand {
   bool get _shouldAddDartJs {
     return !_entrypoints.isEmpty &&
         entrypoint.root.dependencies.any((dep) =>
-            dep.name == 'browser' && dep.source.name == 'hosted');
+            dep.name == 'browser' && dep.source == 'hosted');
   }
 }
diff --git a/test/deploy/compiles_dart_entrypoints_to_dart_and_js.dart b/test/deploy/compiles_dart_entrypoints_to_dart_and_js_test.dart
similarity index 100%
rename from test/deploy/compiles_dart_entrypoints_to_dart_and_js.dart
rename to test/deploy/compiles_dart_entrypoints_to_dart_and_js_test.dart
diff --git a/test/deploy/copies_dart_js_next_to_entrypoints.dart b/test/deploy/copies_dart_js_next_to_entrypoints_test.dart
similarity index 100%
rename from test/deploy/copies_dart_js_next_to_entrypoints.dart
rename to test/deploy/copies_dart_js_next_to_entrypoints_test.dart
diff --git a/test/deploy/copies_non_dart_files_to_deploy.dart b/test/deploy/copies_non_dart_files_to_deploy_test.dart
similarity index 100%
rename from test/deploy/copies_non_dart_files_to_deploy.dart
rename to test/deploy/copies_non_dart_files_to_deploy_test.dart
diff --git a/test/deploy/ignores_non_entrypoint_dart_files.dart b/test/deploy/ignores_non_entrypoint_dart_files_test.dart
similarity index 97%
rename from test/deploy/ignores_non_entrypoint_dart_files.dart
rename to test/deploy/ignores_non_entrypoint_dart_files_test.dart
index 249d5616fa75884e92e444c1315390c001549975..cc6610fb236232d380b6cff8ba9151274a5f9574 100644
--- a/test/deploy/ignores_non_entrypoint_dart_files.dart
+++ b/test/deploy/ignores_non_entrypoint_dart_files_test.dart
@@ -35,7 +35,7 @@ Copying   web/ => deploy/
         d.nothing('file2.dart.js'),
         d.nothing('file2.dart'),
         d.nothing('file3.dart.js'),
-        d.nothing('file3.dart')
+        d.nothing('file3.dart'),
         d.nothing('file4.dart.js'),
         d.nothing('file4.dart')
       ])
diff --git a/test/deploy/reports_dart_parse_errors.dart b/test/deploy/reports_dart_parse_errors_test.dart
similarity index 100%
rename from test/deploy/reports_dart_parse_errors.dart
rename to test/deploy/reports_dart_parse_errors_test.dart
diff --git a/test/deploy/with_no_web_directory.dart b/test/deploy/with_no_web_directory_test.dart
similarity index 100%
rename from test/deploy/with_no_web_directory.dart
rename to test/deploy/with_no_web_directory_test.dart