@@ -3,16 +3,14 @@ import * as helpers from "../common/helpers";
33abstract class TestCommandBase {
44 public allowedParameters : ICommandParameter [ ] = [ ] ;
55 private projectFilesConfig : IProjectFilesConfig ;
6+ protected abstract platform : string ;
67 protected abstract $projectData : IProjectData ;
78 protected abstract $testExecutionService : ITestExecutionService ;
89 protected abstract $analyticsService : IAnalyticsService ;
910 protected abstract $options : IOptions ;
1011 protected abstract $platformEnvironmentRequirements : IPlatformEnvironmentRequirements ;
1112 protected abstract $errors : IErrors ;
1213
13- constructor ( private platform : string ) {
14- }
15-
1614 async execute ( args : string [ ] ) : Promise < void > {
1715 await this . $testExecutionService . startKarmaServer ( this . platform , this . $projectData , this . projectFilesConfig ) ;
1816 }
@@ -46,25 +44,29 @@ abstract class TestCommandBase {
4644}
4745
4846class TestAndroidCommand extends TestCommandBase implements ICommand {
47+ protected platform = "android" ;
48+
4949 constructor ( protected $projectData : IProjectData ,
5050 protected $testExecutionService : ITestExecutionService ,
5151 protected $analyticsService : IAnalyticsService ,
5252 protected $options : IOptions ,
5353 protected $platformEnvironmentRequirements : IPlatformEnvironmentRequirements ,
5454 protected $errors : IErrors ) {
55- super ( "android" ) ;
55+ super ( ) ;
5656 }
5757
5858}
5959
6060class TestIosCommand extends TestCommandBase implements ICommand {
61+ protected platform = "iOS" ;
62+
6163 constructor ( protected $projectData : IProjectData ,
6264 protected $testExecutionService : ITestExecutionService ,
6365 protected $analyticsService : IAnalyticsService ,
6466 protected $options : IOptions ,
6567 protected $platformEnvironmentRequirements : IPlatformEnvironmentRequirements ,
6668 protected $errors : IErrors ) {
67- super ( "iOS" ) ;
69+ super ( ) ;
6870 }
6971
7072}
0 commit comments