@@ -9,12 +9,11 @@ import { IPlatformEnvironmentRequirements } from "../definitions/platform";
99import { IMigrateController } from "../definitions/migrate" ;
1010import { ICommandParameter , ICommand } from "../common/definitions/commands" ;
1111import {
12- OptionType ,
1312 IAnalyticsService ,
1413 IErrors ,
1514 IDictionary ,
16- ErrorCodes ,
1715} from "../common/declarations" ;
16+ import { ErrorCodes , OptionType } from "../common/enums" ;
1817import { ICleanupService } from "../definitions/cleanup-service" ;
1918import { injector } from "../common/yok" ;
2019
@@ -47,19 +46,18 @@ abstract class TestCommandBase {
4746 sdk : this . $options . sdk ,
4847 } ) ;
4948
50- const selectedDeviceForDebug = await this . $devicesService . pickSingleDevice (
51- {
49+ const selectedDeviceForDebug =
50+ await this . $devicesService . pickSingleDevice ( {
5251 onlyEmulators : this . $options . emulator ,
5352 onlyDevices : this . $options . forDevice ,
5453 deviceId : this . $options . device ,
55- }
56- ) ;
54+ } ) ;
5755 devices = [ selectedDeviceForDebug ] ;
5856 // const debugData = this.getDebugData(platform, projectData, deployOptions, { device: selectedDeviceForDebug.deviceInfo.identifier });
5957 // await this.$debugService.debug(debugData, this.$options);
6058 } else {
6159 devices = await this . $liveSyncCommandHelper . getDeviceInstances (
62- this . platform
60+ this . platform ,
6361 ) ;
6462 }
6563
@@ -69,25 +67,26 @@ abstract class TestCommandBase {
6967 this . $options . env . unitTesting = true ;
7068
7169 const liveSyncInfo = this . $liveSyncCommandHelper . getLiveSyncData (
72- this . $projectData . projectDir
70+ this . $projectData . projectDir ,
7371 ) ;
7472
7573 const deviceDebugMap : IDictionary < boolean > = { } ;
7674 devices . forEach (
7775 ( device ) =>
78- ( deviceDebugMap [ device . deviceInfo . identifier ] = this . $options . debugBrk )
76+ ( deviceDebugMap [ device . deviceInfo . identifier ] = this . $options . debugBrk ) ,
7977 ) ;
8078
81- const deviceDescriptors = await this . $liveSyncCommandHelper . createDeviceDescriptors (
82- devices ,
83- this . platform ,
84- < any > { deviceDebugMap }
85- ) ;
79+ const deviceDescriptors =
80+ await this . $liveSyncCommandHelper . createDeviceDescriptors (
81+ devices ,
82+ this . platform ,
83+ < any > { deviceDebugMap } ,
84+ ) ;
8685
8786 await this . $testExecutionService . startKarmaServer (
8887 this . platform ,
8988 liveSyncInfo ,
90- deviceDescriptors
89+ deviceDescriptors ,
9190 ) ;
9291 // if we got here, it means karma exited with exit code 0 (success)
9392 process . exit ( 0 ) ;
@@ -100,7 +99,7 @@ abstract class TestCommandBase {
10099 // because the Runtime does not watch for the `/data/local/tmp<appId>-livesync-in-progress` file deletion.
101100 // The App is closing itself after each test execution and the bug will be reproducible on each LiveSync.
102101 this . $errors . fail (
103- "The `--hmr` option is not supported for this command."
102+ "The `--hmr` option is not supported for this command." ,
104103 ) ;
105104 }
106105
@@ -112,23 +111,21 @@ abstract class TestCommandBase {
112111
113112 this . $projectData . initializeProjectData ( ) ;
114113 this . $analyticsService . setShouldDispose (
115- this . $options . justlaunch || ! this . $options . watch
114+ this . $options . justlaunch || ! this . $options . watch ,
116115 ) ;
117116 this . $cleanupService . setShouldDispose (
118- this . $options . justlaunch || ! this . $options . watch
117+ this . $options . justlaunch || ! this . $options . watch ,
119118 ) ;
120119
121- const output = await this . $platformEnvironmentRequirements . checkEnvironmentRequirements (
122- {
120+ const output =
121+ await this . $platformEnvironmentRequirements . checkEnvironmentRequirements ( {
123122 platform : this . platform ,
124123 projectDir : this . $projectData . projectDir ,
125124 options : this . $options ,
126- }
127- ) ;
125+ } ) ;
128126
129- const canStartKarmaServer = await this . $testExecutionService . canStartKarmaServer (
130- this . $projectData
131- ) ;
127+ const canStartKarmaServer =
128+ await this . $testExecutionService . canStartKarmaServer ( this . $projectData ) ;
132129 if ( ! canStartKarmaServer ) {
133130 this . $errors . fail ( {
134131 formatStr :
@@ -154,7 +151,7 @@ class TestAndroidCommand extends TestCommandBase implements ICommand {
154151 protected $cleanupService : ICleanupService ,
155152 protected $liveSyncCommandHelper : ILiveSyncCommandHelper ,
156153 protected $devicesService : Mobile . IDevicesService ,
157- protected $migrateController : IMigrateController
154+ protected $migrateController : IMigrateController ,
158155 ) {
159156 super ( ) ;
160157 }
@@ -195,7 +192,7 @@ class TestIosCommand extends TestCommandBase implements ICommand {
195192 protected $cleanupService : ICleanupService ,
196193 protected $liveSyncCommandHelper : ILiveSyncCommandHelper ,
197194 protected $devicesService : Mobile . IDevicesService ,
198- protected $migrateController : IMigrateController
195+ protected $migrateController : IMigrateController ,
199196 ) {
200197 super ( ) ;
201198 }
0 commit comments