Skip to content

Commit c5a8767

Browse files
committed
chore: fix pr comments
1 parent c2f74d3 commit c5a8767

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/commands/test-init.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class TestInitCommand implements ICommand {
3737
const dependencies = this.frameworkDependencies[frameworkToInstall] || [];
3838
const modulesToInstall: IDependencyInformation[] = [
3939
{
40-
name: 'karma'
40+
name: 'karma',
41+
// Hardcode the version unitl https://github.com/karma-runner/karma/issues/3052 is fixed
42+
version: "2.0.2"
4143
},
4244
{
4345
name: `karma-${frameworkToInstall}`

lib/commands/test.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ import * as helpers from "../common/helpers";
33
abstract 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

4846
class 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

6060
class 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

Comments
 (0)