@@ -38,9 +38,11 @@ https.get = jest.fn().mockImplementation((url, callback) => {
3838} )
3939
4040const octokit = {
41- issues : {
42- create : jest . fn ( ) ,
43- listForRepo : jest . fn ( )
41+ rest : {
42+ issues : {
43+ create : jest . fn ( ) ,
44+ listForRepo : jest . fn ( )
45+ }
4446 }
4547}
4648getOctokit . mockImplementation ( ( ) => octokit )
@@ -51,20 +53,20 @@ test('handles feeds without any entries', async () => {
5153 await run ( )
5254
5355 expect ( https . get ) . toHaveBeenCalledTimes ( 1 )
54- expect ( octokit . issues . listForRepo ) . not . toHaveBeenCalled ( )
55- expect ( octokit . issues . create ) . not . toHaveBeenCalled ( )
56+ expect ( octokit . rest . issues . listForRepo ) . not . toHaveBeenCalled ( )
57+ expect ( octokit . rest . issues . create ) . not . toHaveBeenCalled ( )
5658} )
5759
5860test ( 'handles feed entries without titles' , async ( ) => {
5961 const date = '2021-06-19T01:01:29+12:00'
6062 mockHTTPSGet . __RETURN__ = `<feed xmlns="http://www.w3.org/2005/Atom"><entry><published>${ date } </published><content type="html">TBD</content></entry></feed>`
6163 core . __INPUTS__ [ 'max-age' ] = '9999d'
62- octokit . issues . listForRepo . mockReturnValueOnce ( { data : [ ] } )
64+ octokit . rest . issues . listForRepo . mockReturnValueOnce ( { data : [ ] } )
6365 await run ( )
6466
6567 expect ( https . get ) . toHaveBeenCalledTimes ( 1 )
66- expect ( octokit . issues . listForRepo ) . toHaveBeenCalledTimes ( 1 )
67- expect ( octokit . issues . create ) . toHaveBeenCalledWith ( {
68+ expect ( octokit . rest . issues . listForRepo ) . toHaveBeenCalledTimes ( 1 )
69+ expect ( octokit . rest . issues . create ) . toHaveBeenCalledWith ( {
6870 owner : 'owner' ,
6971 repo : 'repo' ,
7072 title : new Date ( date ) . toUTCString ( ) ,
@@ -103,10 +105,10 @@ Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;<
103105 </entry>
104106</feed>
105107`
106- octokit . issues . listForRepo . mockReturnValueOnce ( { data : [ ] } )
108+ octokit . rest . issues . listForRepo . mockReturnValueOnce ( { data : [ ] } )
107109 await run ( )
108110
109- expect ( octokit . issues . create ) . toHaveBeenCalledWith ( {
111+ expect ( octokit . rest . issues . create ) . toHaveBeenCalledWith ( {
110112 owner : 'owner' ,
111113 repo : 'repo' ,
112114 title : 'ci(release-tags): use newer versions of Actions' ,
0 commit comments