@@ -3,16 +3,14 @@ import * as helpers from "../common/helpers";
3
3
abstract class TestCommandBase {
4
4
public allowedParameters : ICommandParameter [ ] = [ ] ;
5
5
private projectFilesConfig : IProjectFilesConfig ;
6
+ protected abstract platform : string ;
6
7
protected abstract $projectData : IProjectData ;
7
8
protected abstract $testExecutionService : ITestExecutionService ;
8
9
protected abstract $analyticsService : IAnalyticsService ;
9
10
protected abstract $options : IOptions ;
10
11
protected abstract $platformEnvironmentRequirements : IPlatformEnvironmentRequirements ;
11
12
protected abstract $errors : IErrors ;
12
13
13
- constructor ( private platform : string ) {
14
- }
15
-
16
14
async execute ( args : string [ ] ) : Promise < void > {
17
15
await this . $testExecutionService . startKarmaServer ( this . platform , this . $projectData , this . projectFilesConfig ) ;
18
16
}
@@ -46,25 +44,29 @@ abstract class TestCommandBase {
46
44
}
47
45
48
46
class TestAndroidCommand extends TestCommandBase implements ICommand {
47
+ protected platform = "android" ;
48
+
49
49
constructor ( protected $projectData : IProjectData ,
50
50
protected $testExecutionService : ITestExecutionService ,
51
51
protected $analyticsService : IAnalyticsService ,
52
52
protected $options : IOptions ,
53
53
protected $platformEnvironmentRequirements : IPlatformEnvironmentRequirements ,
54
54
protected $errors : IErrors ) {
55
- super ( "android" ) ;
55
+ super ( ) ;
56
56
}
57
57
58
58
}
59
59
60
60
class TestIosCommand extends TestCommandBase implements ICommand {
61
+ protected platform = "iOS" ;
62
+
61
63
constructor ( protected $projectData : IProjectData ,
62
64
protected $testExecutionService : ITestExecutionService ,
63
65
protected $analyticsService : IAnalyticsService ,
64
66
protected $options : IOptions ,
65
67
protected $platformEnvironmentRequirements : IPlatformEnvironmentRequirements ,
66
68
protected $errors : IErrors ) {
67
- super ( "iOS" ) ;
69
+ super ( ) ;
68
70
}
69
71
70
72
}
0 commit comments