From 3b96eafdd69d5a2928a8384df2aff532964b80a1 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Tue, 16 Feb 2016 23:20:23 +0200 Subject: [PATCH] Initialize devicesService on tns test We have to initialize devicesService when executing tns test command as currently it fails when calling livesyncBase. --- lib/services/test-execution-service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/services/test-execution-service.ts b/lib/services/test-execution-service.ts index a530e2a45c..254d6f5eb5 100644 --- a/lib/services/test-execution-service.ts +++ b/lib/services/test-execution-service.ts @@ -31,7 +31,8 @@ class TestExecutionService implements ITestExecutionService { private $fs: IFileSystem, private $options: IOptions, private $pluginsService: IPluginsService, - private $errors: IErrors) { + private $errors: IErrors, + private $devicesService: Mobile.IDevicesService) { } public startTestRunner(platform: string) : IFuture { @@ -43,7 +44,7 @@ class TestExecutionService implements ITestExecutionService { try { let platformData = this.$platformsData.getPlatformData(platform.toLowerCase()); let projectDir = this.$projectData.projectDir; - + this.$devicesService.initialize({ platform: platform, deviceId: this.$options.device }).wait(); let projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME); let configOptions: IKarmaConfigOptions = JSON.parse(launcherConfig);