@@ -19,7 +19,6 @@ export class TestExecutionService implements ITestExecutionService {
1919 private $fs : IFileSystem ,
2020 private $options : IOptions ,
2121 private $pluginsService : IPluginsService ,
22- private $errors : IErrors ,
2322 private $devicesService : Mobile . IDevicesService ,
2423 private $childProcess : IChildProcess ) {
2524 }
@@ -59,7 +58,8 @@ export class TestExecutionService implements ITestExecutionService {
5958 this . $fs . writeFile ( path . join ( projectDir , TestExecutionService . CONFIG_FILE_NAME ) , configJs ) ;
6059 }
6160
62- await this . preparePlatform ( projectData , platform ) ;
61+ // Prepare the project AFTER the TestExecutionService.CONFIG_FILE_NAME file is created in node_modules
62+ // so it will be sent to device.
6363
6464 let devices = [ ] ;
6565 if ( this . $options . debugBrk ) {
@@ -217,32 +217,5 @@ export class TestExecutionService implements ITestExecutionService {
217217
218218 return karmaConfig ;
219219 }
220-
221- private async preparePlatform ( projectData : IProjectData , platform : string ) : Promise < void > {
222- if ( this . $options . bundle ) {
223- return ;
224- }
225-
226- const appFilesUpdaterOptions : IAppFilesUpdaterOptions = {
227- bundle : ! ! this . $options . bundle ,
228- release : this . $options . release ,
229- useHotModuleReload : this . $options . hmr
230- } ;
231- const preparePlatformInfo : IPreparePlatformInfo = {
232- platform,
233- appFilesUpdaterOptions,
234- platformTemplate : this . $options . platformTemplate ,
235- projectData,
236- config : this . $options ,
237- env : this . $options . env
238- } ;
239-
240- // Prepare the project AFTER the TestExecutionService.CONFIG_FILE_NAME file is created in node_modules
241- // so it will be sent to device.
242- const isPlatformPrepared = await this . $platformService . preparePlatform ( preparePlatformInfo ) ;
243- if ( ! isPlatformPrepared ) {
244- this . $errors . failWithoutHelp ( "Verify that listed files are well-formed and try again the operation." ) ;
245- }
246- }
247220}
248221$injector . register ( 'testExecutionService' , TestExecutionService ) ;
0 commit comments