@@ -49,7 +49,7 @@ test('reject requests other than webhook payloads', async () => {
4949 body : `Not a valid GitHub webhook: Error: ${ message } ` ,
5050 status : 403
5151 } )
52- expect ( context . done ) . toHaveBeenCalledTimes ( 1 )
52+ expect ( context . done ) . not . toHaveBeenCalled ( )
5353 }
5454
5555 await expectInvalidWebhook ( 'Unexpected content type: text/plain' )
@@ -142,7 +142,7 @@ const testIssueComment = (comment, repoOwner, fn) => {
142142 try {
143143 expect ( await index ( context , context . req ) ) . toBeUndefined ( )
144144 await fn ( context )
145- expect ( context . done ) . toHaveBeenCalledTimes ( 1 )
145+ expect ( context . done ) . not . toHaveBeenCalled ( )
146146 } catch ( e ) {
147147 context . log . mock . calls . forEach ( e => console . log ( e [ 0 ] ) )
148148 throw e ;
@@ -151,7 +151,7 @@ const testIssueComment = (comment, repoOwner, fn) => {
151151}
152152
153153testIssueComment ( '/test' , async ( context ) => {
154- expect ( context . done ) . toHaveBeenCalledTimes ( 1 )
154+ expect ( context . done ) . not . toHaveBeenCalled ( )
155155 expect ( context . res ) . toEqual ( {
156156 body : 'Okay, triggered <the URL to the workflow handle-pr-comment.yml run on main with inputs {"pr-comment-url":"https://github.com/gitgitgadget/git/pull/1886743660"}>!'
157157 } )
@@ -160,7 +160,7 @@ testIssueComment('/test', async (context) => {
160160} )
161161
162162testIssueComment ( '/verify-repository' , 'nope' , ( context ) => {
163- expect ( context . done ) . toHaveBeenCalledTimes ( 1 )
163+ expect ( context . done ) . not . toHaveBeenCalled ( )
164164 expect ( context . res ) . toEqual ( {
165165 body : 'Refusing to work on a repository other than gitgitgadget/git or git/git' ,
166166 'status' : 403 ,
@@ -178,7 +178,7 @@ const testWebhookPayload = (testLabel, gitHubEvent, payload, fn) => {
178178 try {
179179 expect ( await index ( context , context . req ) ) . toBeUndefined ( )
180180 await fn ( context )
181- expect ( context . done ) . toHaveBeenCalledTimes ( 1 )
181+ expect ( context . done ) . not . toHaveBeenCalled ( )
182182 } catch ( e ) {
183183 context . log . mock . calls . forEach ( e => console . log ( e [ 0 ] ) )
184184 throw e ;
@@ -305,4 +305,4 @@ testWebhookPayload('react to PR push', 'pull_request', {
305305 'pr-url' : 'https://github.com/gitgitgadget/git/pull/1956' ,
306306 }
307307 ] )
308- } )
308+ } )
0 commit comments