@@ -24,7 +24,7 @@ describe('apple-podcasts search command', () => {
2424 } ) ,
2525 } ) ;
2626 vi . stubGlobal ( 'fetch' , fetchMock ) ;
27- const result = await cmd . func ( null , {
27+ const result = await cmd . func ( {
2828 query : 'machine learning' ,
2929 keyword : 'sports' ,
3030 limit : 5 ,
@@ -60,7 +60,7 @@ describe('apple-podcasts top command', () => {
6060 } ) ,
6161 } ) ;
6262 vi . stubGlobal ( 'fetch' , fetchMock ) ;
63- await cmd . func ( null , { country : 'US' , limit : 1 } ) ;
63+ await cmd . func ( { country : 'US' , limit : 1 } ) ;
6464 const [ , options ] = fetchMock . mock . calls [ 0 ] ?? [ ] ;
6565 expect ( options ) . toBeDefined ( ) ;
6666 expect ( options . signal ) . toBeDefined ( ) ;
@@ -81,7 +81,7 @@ describe('apple-podcasts top command', () => {
8181 } ) ,
8282 } ) ;
8383 vi . stubGlobal ( 'fetch' , fetchMock ) ;
84- const result = await cmd . func ( null , { country : 'US' , limit : 2 } ) ;
84+ const result = await cmd . func ( { country : 'US' , limit : 2 } ) ;
8585 expect ( fetchMock ) . toHaveBeenCalledWith ( 'https://rss.marketingtools.apple.com/api/v2/us/podcasts/top/2/podcasts.json' , expect . objectContaining ( {
8686 signal : expect . any ( Object ) ,
8787 } ) ) ;
@@ -94,6 +94,6 @@ describe('apple-podcasts top command', () => {
9494 const cmd = getRegistry ( ) . get ( 'apple-podcasts/top' ) ;
9595 expect ( cmd ?. func ) . toBeTypeOf ( 'function' ) ;
9696 vi . stubGlobal ( 'fetch' , vi . fn ( ) . mockRejectedValue ( new Error ( 'socket hang up' ) ) ) ;
97- await expect ( cmd . func ( null , { country : 'us' , limit : 3 } ) ) . rejects . toThrow ( 'Unable to reach Apple Podcasts charts for US' ) ;
97+ await expect ( cmd . func ( { country : 'us' , limit : 3 } ) ) . rejects . toThrow ( 'Unable to reach Apple Podcasts charts for US' ) ;
9898 } ) ;
9999} ) ;
0 commit comments