Skip to content

Commit afa5102

Browse files
author
Nadezhda Atanasova
authored
"This" is not the correct property invoker in current context (#3013)
Options are passed az function argument and should not be called with this.
1 parent 184a91b commit afa5102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/commands/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function RunTestCommandFactory(platform: string) {
66
$testExecutionService: ITestExecutionService,
77
$projectData: IProjectData) {
88
$projectData.initializeProjectData();
9-
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: this.$options.release });
9+
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: $options.release });
1010
this.execute = (args: string[]): Promise<void> => $testExecutionService.startTestRunner(platform, $projectData, projectFilesConfig);
1111
this.allowedParameters = [];
1212
};
@@ -18,7 +18,7 @@ $injector.registerCommand("dev-test|ios", RunTestCommandFactory('iOS'));
1818
function RunKarmaTestCommandFactory(platform: string) {
1919
return function RunKarmaTestCommand($options: IOptions, $testExecutionService: ITestExecutionService, $projectData: IProjectData) {
2020
$projectData.initializeProjectData();
21-
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: this.$options.release });
21+
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: $options.release });
2222
this.execute = (args: string[]): Promise<void> => $testExecutionService.startKarmaServer(platform, $projectData, projectFilesConfig);
2323
this.allowedParameters = [];
2424
};

0 commit comments

Comments
 (0)