diff --git a/lib/commands/test.ts b/lib/commands/test.ts index b990a02d44..1fe1ea00e0 100644 --- a/lib/commands/test.ts +++ b/lib/commands/test.ts @@ -4,8 +4,10 @@ function RunTestCommandFactory(platform: string) { return function RunTestCommand( $options: IOptions, $testExecutionService: ITestExecutionService, - $projectData: IProjectData) { + $projectData: IProjectData, + $analyticsService: IAnalyticsService) { $projectData.initializeProjectData(); + $analyticsService.setShouldDispose($options.justlaunch || !$options.watch); const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: $options.release }); this.execute = (args: string[]): Promise => $testExecutionService.startTestRunner(platform, $projectData, projectFilesConfig); this.allowedParameters = []; @@ -16,8 +18,9 @@ $injector.registerCommand("dev-test|android", RunTestCommandFactory('android')); $injector.registerCommand("dev-test|ios", RunTestCommandFactory('iOS')); function RunKarmaTestCommandFactory(platform: string) { - return function RunKarmaTestCommand($options: IOptions, $testExecutionService: ITestExecutionService, $projectData: IProjectData) { + return function RunKarmaTestCommand($options: IOptions, $testExecutionService: ITestExecutionService, $projectData: IProjectData, $analyticsService: IAnalyticsService) { $projectData.initializeProjectData(); + $analyticsService.setShouldDispose($options.justlaunch || !$options.watch); const projectFilesConfig = helpers.getProjectFilesConfig({ isReleaseBuild: $options.release }); this.execute = (args: string[]): Promise => $testExecutionService.startKarmaServer(platform, $projectData, projectFilesConfig); this.allowedParameters = []; diff --git a/lib/common b/lib/common index df4b878e82..517a9383a7 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit df4b878e824694391313552b49a7a7490e65138e +Subproject commit 517a9383a7060ff127bd6937688dbd05aaff4aae diff --git a/lib/services/test-execution-service.ts b/lib/services/test-execution-service.ts index ee432369ed..af12f05914 100644 --- a/lib/services/test-execution-service.ts +++ b/lib/services/test-execution-service.ts @@ -26,9 +26,7 @@ class TestExecutionService implements ITestExecutionService { private $errors: IErrors, private $debugService: IDebugService, private $devicesService: Mobile.IDevicesService, - private $analyticsService: IAnalyticsService, private $childProcess: IChildProcess) { - this.$analyticsService.setShouldDispose(this.$options.justlaunch || !this.$options.watch); } public platform: string;