Skip to content

Commit

Permalink
Initialize devicesService on tns test
Browse files Browse the repository at this point in the history
We have to initialize devicesService when executing tns test command as currently it fails when calling livesyncBase.
  • Loading branch information
rosen-vladimirov committed Feb 16, 2016
1 parent e2670c7 commit 3b96eaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/services/test-execution-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand All @@ -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);
Expand Down

0 comments on commit 3b96eaf

Please sign in to comment.