Skip to content

Commit

Permalink
"This" is not the correct property invoker in current context (#3013)
Browse files Browse the repository at this point in the history
Options are passed az function argument and should not be called with this.
  • Loading branch information
Nadezhda Atanasova authored Jul 28, 2017
1 parent 184a91b commit afa5102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function RunTestCommandFactory(platform: string) {
$testExecutionService: ITestExecutionService,
$projectData: IProjectData) {
$projectData.initializeProjectData();
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: this.$options.release });
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: $options.release });
this.execute = (args: string[]): Promise<void> => $testExecutionService.startTestRunner(platform, $projectData, projectFilesConfig);
this.allowedParameters = [];
};
Expand All @@ -18,7 +18,7 @@ $injector.registerCommand("dev-test|ios", RunTestCommandFactory('iOS'));
function RunKarmaTestCommandFactory(platform: string) {
return function RunKarmaTestCommand($options: IOptions, $testExecutionService: ITestExecutionService, $projectData: IProjectData) {
$projectData.initializeProjectData();
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: this.$options.release });
const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: $options.release });
this.execute = (args: string[]): Promise<void> => $testExecutionService.startKarmaServer(platform, $projectData, projectFilesConfig);
this.allowedParameters = [];
};
Expand Down

0 comments on commit afa5102

Please sign in to comment.