@@ -28,7 +28,7 @@ const initService = async ({
2828 getImageMock = jest . fn ( ) ,
2929 saveImageMock = jest . fn ( ) ,
3030 deleteImageMock = jest . fn ( ) ,
31- eventNewTestRunMock = jest . fn ( ) ,
31+ eventTestRunCreatedMock = jest . fn ( ) ,
3232 eventTestRunDeletedMock = jest . fn ( ) ,
3333 eventBuildUpdatedMock = jest . fn ( ) ,
3434 eventBuildCreatedMock = jest . fn ( ) ,
@@ -80,7 +80,7 @@ const initService = async ({
8080 {
8181 provide : EventsGateway ,
8282 useValue : {
83- newTestRun : eventNewTestRunMock ,
83+ testRunCreated : eventTestRunCreatedMock ,
8484 testRunDeleted : eventTestRunDeletedMock ,
8585 buildUpdated : eventBuildUpdatedMock ,
8686 buildCreated : eventBuildCreatedMock ,
@@ -470,8 +470,8 @@ describe('TestRunsService', () => {
470470 const image = 'image' ;
471471 const baseline = 'baseline' ;
472472 const getImageMock = jest . fn ( ) . mockReturnValueOnce ( baseline ) . mockReturnValueOnce ( image ) ;
473- const eventNewTestRunMock = jest . fn ( ) ;
474- service = await initService ( { testRunCreateMock, saveImageMock, getImageMock, eventNewTestRunMock } ) ;
473+ const eventTestRunCreatedMock = jest . fn ( ) ;
474+ service = await initService ( { testRunCreateMock, saveImageMock, getImageMock, eventTestRunCreatedMock } ) ;
475475 const diffResult : DiffResult = {
476476 status : TestStatus . unresolved ,
477477 diffName : 'diff image name' ,
@@ -525,7 +525,7 @@ describe('TestRunsService', () => {
525525 } ) ;
526526 expect ( getDiffMock ) . toHaveBeenCalledWith ( baseline , image , testRun . diffTollerancePercent , testRun . ignoreAreas ) ;
527527 expect ( saveDiffResultMock ) . toHaveBeenCalledWith ( testRun . id , diffResult ) ;
528- expect ( eventNewTestRunMock ) . toHaveBeenCalledWith ( testRunWithResult ) ;
528+ expect ( eventTestRunCreatedMock ) . toHaveBeenCalledWith ( testRunWithResult ) ;
529529 expect ( result ) . toBe ( testRunWithResult ) ;
530530 } ) ;
531531
0 commit comments