@@ -146,13 +146,14 @@ test('open applies stored runtime launchUrl and reports runtime hints', async ()
146146 }
147147} ) ;
148148
149- test ( 'open applies launchConsole only to the direct app launch before runtime launchUrl' , async ( ) => {
149+ test ( 'open applies launch-only flags only to the direct app launch before runtime launchUrl' , async ( ) => {
150150 const sessionStore = makeSessionStore ( ) ;
151151 const launchConsolePath = path . join ( os . tmpdir ( ) , 'launch-console.log' ) ;
152152 const dispatchCalls : Array < {
153153 command : string ;
154154 positionals : string [ ] ;
155155 launchConsole ?: string ;
156+ launchArgs ?: string [ ] ;
156157 } > = [ ] ;
157158
158159 sessionStore . setRuntimeHints ( 'launch-console-runtime' , {
@@ -167,7 +168,12 @@ test('open applies launchConsole only to the direct app launch before runtime la
167168 booted : true ,
168169 } ) ;
169170 mockDispatch . mockImplementation ( async ( _device , command , positionals , _outPath , context ) => {
170- dispatchCalls . push ( { command, positionals, launchConsole : context ?. launchConsole } ) ;
171+ dispatchCalls . push ( {
172+ command,
173+ positionals,
174+ launchConsole : context ?. launchConsole ,
175+ launchArgs : context ?. launchArgs ,
176+ } ) ;
171177 return { } ;
172178 } ) ;
173179
@@ -177,7 +183,7 @@ test('open applies launchConsole only to the direct app launch before runtime la
177183 session : 'launch-console-runtime' ,
178184 command : 'open' ,
179185 positionals : [ 'Demo' ] ,
180- flags : { platform : 'ios' , launchConsole : launchConsolePath } ,
186+ flags : { platform : 'ios' , launchConsole : launchConsolePath , launchArgs : [ '-Flag' , 'YES' ] } ,
181187 } ,
182188 sessionName : 'launch-console-runtime' ,
183189 logPath : path . join ( os . tmpdir ( ) , 'daemon.log' ) ,
@@ -187,8 +193,18 @@ test('open applies launchConsole only to the direct app launch before runtime la
187193
188194 expect ( response ?. ok ) . toBe ( true ) ;
189195 expect ( dispatchCalls ) . toEqual ( [
190- { command : 'open' , positionals : [ 'Demo' ] , launchConsole : launchConsolePath } ,
191- { command : 'open' , positionals : [ 'myapp://dev-client' ] , launchConsole : undefined } ,
196+ {
197+ command : 'open' ,
198+ positionals : [ 'Demo' ] ,
199+ launchConsole : launchConsolePath ,
200+ launchArgs : [ '-Flag' , 'YES' ] ,
201+ } ,
202+ {
203+ command : 'open' ,
204+ positionals : [ 'myapp://dev-client' ] ,
205+ launchConsole : undefined ,
206+ launchArgs : undefined ,
207+ } ,
192208 ] ) ;
193209} ) ;
194210
0 commit comments