@@ -88,8 +88,7 @@ describe('stop_mac_app plugin', () => {
8888 ) ;
8989
9090 expect ( calls ) . toHaveLength ( 1 ) ;
91- expect ( calls [ 0 ] ) . toEqual ( [ 'pkill' , '-x' , '--' , 'Brimday' ] ) ;
92- expect ( calls [ 0 ] ) . not . toContain ( '-f' ) ;
91+ expect ( calls [ 0 ] ) . toEqual ( [ 'pkill' , '-f' , '--' , '^(.*/)?Brimday( |$)' ] ) ;
9392 } ) ;
9493
9594 it ( 'should preserve long app executable names' , async ( ) => {
@@ -107,7 +106,7 @@ describe('stop_mac_app plugin', () => {
107106 ) ,
108107 ) ;
109108
110- expect ( calls [ 0 ] ) . toEqual ( [ 'pkill' , '-x ' , '--' , 'ThisIsAVeryLongApplicationName' ] ) ;
109+ expect ( calls [ 0 ] ) . toEqual ( [ 'pkill' , '-f ' , '--' , '^(.*/)? ThisIsAVeryLongApplicationName( |$) ' ] ) ;
111110 } ) ;
112111
113112 it ( 'should treat app names as literal process names' , async ( ) => {
@@ -125,7 +124,7 @@ describe('stop_mac_app plugin', () => {
125124 ) ,
126125 ) ;
127126
128- expect ( calls [ 0 ] ) . toEqual ( [ 'pkill' , '-x ' , '--' , '-Example\\.\\*\\[Test\\]' ] ) ;
127+ expect ( calls [ 0 ] ) . toEqual ( [ 'pkill' , '-f ' , '--' , '^(.*/)? -Example\\.\\*\\[Test\\]( |$) ' ] ) ;
129128 } ) ;
130129
131130 it ( 'should prioritize processId over appName' , async ( ) => {
0 commit comments