@@ -2,6 +2,7 @@ import { PullRequestMerged } from '../../../src/reactions/github/pull-request-me
22import { PullRequestPayload } from '../../../src/schemas/github/pull-request-payload' ;
33import { TwitchChatMock } from '../../__mocks__/TwitchChat' ;
44import { StreamLabsMock } from '../../__mocks__/StreamLabs' ;
5+ import { PullRequestPayloadBuilder } from '../../builders/github/pull-request-payload-builder' ;
56
67describe ( 'PullRequestMerged' , ( ) => {
78 let streamlabs : StreamLabsMock ;
@@ -16,15 +17,17 @@ describe('PullRequestMerged', () => {
1617 let payload : PullRequestPayload ;
1718
1819 beforeEach ( ( ) => {
19- payload = {
20- action : 'closed' ,
21- repository : {
22- full_name : 'streamdevs/webhook' ,
23- html_url : 'https://github.com/streamdevs/webhook' ,
24- } ,
25- pull_request : { user : { login : 'SantiMA10' } , merged : true } ,
26- sender : { login : 'pepe' } ,
27- } ;
20+ payload = new PullRequestPayloadBuilder ( )
21+ . with ( {
22+ action : 'closed' ,
23+ repository : {
24+ full_name : 'streamdevs/webhook' ,
25+ html_url : 'https://github.com/streamdevs/webhook' ,
26+ } ,
27+ pull_request : { user : { login : 'SantiMA10' } , merged : true } ,
28+ sender : { login : 'pepe' } ,
29+ } )
30+ . getInstance ( ) ;
2831 } ) ;
2932
3033 it ( "returns 'twitchChat.notified' === false if something goes wrong with TwitchChat" , async ( ) => {
0 commit comments