@@ -219,6 +219,7 @@ describe('hooks/useNotifications.ts', () => {
219
219
title : 'This is an Issue.' ,
220
220
type : 'Issue' ,
221
221
url : 'https://api.github.com/3' ,
222
+ latest_comment_url : 'https://api.github.com/3/comments' ,
222
223
} ,
223
224
} ,
224
225
{
@@ -227,6 +228,7 @@ describe('hooks/useNotifications.ts', () => {
227
228
title : 'This is a Pull Request.' ,
228
229
type : 'PullRequest' ,
229
230
url : 'https://api.github.com/4' ,
231
+ latest_comment_url : 'https://api.github.com/4/comments' ,
230
232
} ,
231
233
} ,
232
234
{
@@ -258,21 +260,43 @@ describe('hooks/useNotifications.ts', () => {
258
260
search : {
259
261
nodes : [
260
262
{
261
- title : 'This is an answered discussion ' ,
263
+ title : 'This is a Discussion. ' ,
262
264
viewerSubscription : 'SUBSCRIBED' ,
263
265
stateReason : null ,
264
266
isAnswered : true ,
267
+ url : 'https://github.com/manosim/notifications-test/discussions/612' ,
268
+ comments : {
269
+ nodes : [
270
+ {
271
+ databaseId : 2297637 ,
272
+ createdAt : '2022-03-04T20:39:44Z' ,
273
+ author : {
274
+ login : 'comment-user' ,
275
+ } ,
276
+ replies : {
277
+ nodes : [ ] ,
278
+ } ,
279
+ } ,
280
+ ] ,
281
+ } ,
265
282
} ,
266
283
] ,
267
284
} ,
268
285
} ,
269
286
} ) ;
287
+
270
288
nock ( 'https://api.github.com' )
271
289
. get ( '/3' )
272
290
. reply ( 200 , { state : 'closed' , merged : true } ) ;
291
+ nock ( 'https://api.github.com' )
292
+ . get ( '/3/comments' )
293
+ . reply ( 200 , { user : { login : 'some-user' } } ) ;
273
294
nock ( 'https://api.github.com' )
274
295
. get ( '/4' )
275
296
. reply ( 200 , { state : 'closed' , merged : false } ) ;
297
+ nock ( 'https://api.github.com' )
298
+ . get ( '/4/comments' )
299
+ . reply ( 200 , { user : { login : 'some-user' } } ) ;
276
300
nock ( 'https://api.github.com' )
277
301
. get ( '/5' )
278
302
. reply ( 200 , { state : 'open' , draft : false } ) ;
0 commit comments