@@ -41,7 +41,7 @@ describe('Tmate GitHub integration', () => {
4141 Object . defineProperty ( process , "platform" , {
4242 value : "linux"
4343 } )
44- core . getInput . mockReturnValueOnce ( "true" ) . mockReturnValue ( "false" )
44+ core . getInput . mockReturnValueOnce ( "true" ) . mockReturnValueOnce ( "true" ) . mockReturnValue ( "false" )
4545 const customConnectionString = "foobar"
4646 execShellCommand . mockReturnValue ( Promise . resolve ( customConnectionString ) )
4747 await run ( )
@@ -54,7 +54,7 @@ describe('Tmate GitHub integration', () => {
5454 Object . defineProperty ( process , "platform" , {
5555 value : "linux"
5656 } )
57- core . getInput . mockReturnValue ( "false" )
57+ core . getInput . mockReturnValueOnce ( "false" ) . mockReturnValueOnce ( "true" ) . mockReturnValue ( "false" )
5858 const customConnectionString = "foobar"
5959 execShellCommand . mockReturnValue ( Promise . resolve ( customConnectionString ) )
6060 await run ( )
@@ -63,6 +63,19 @@ describe('Tmate GitHub integration', () => {
6363 expect ( core . info ) . toHaveBeenNthCalledWith ( 2 , `SSH: ${ customConnectionString } ` ) ;
6464 expect ( core . info ) . toHaveBeenNthCalledWith ( 3 , "Exiting debugging session because the continue file was created" ) ;
6565 } ) ;
66+ it ( 'should be handle the main loop for linux without installing dependencies' , async ( ) => {
67+ Object . defineProperty ( process , "platform" , {
68+ value : "linux"
69+ } )
70+ core . getInput . mockReturnValue ( "false" )
71+ const customConnectionString = "foobar"
72+ execShellCommand . mockReturnValue ( Promise . resolve ( customConnectionString ) )
73+ await run ( )
74+ expect ( execShellCommand ) . not . toHaveBeenNthCalledWith ( 1 , "apt-get update" )
75+ expect ( core . info ) . toHaveBeenNthCalledWith ( 1 , `Web shell: ${ customConnectionString } ` ) ;
76+ expect ( core . info ) . toHaveBeenNthCalledWith ( 2 , `SSH: ${ customConnectionString } ` ) ;
77+ expect ( core . info ) . toHaveBeenNthCalledWith ( 3 , "Exiting debugging session because the continue file was created" ) ;
78+ } ) ;
6679 it ( 'should install tmate via brew for darwin' , async ( ) => {
6780 Object . defineProperty ( process , "platform" , {
6881 value : "darwin"
0 commit comments