@@ -55,16 +55,11 @@ const createImageMocks = () => {
5555 return {
5656 image,
5757 diffImage,
58- getImageMock : jest
59- . fn ( )
60- . mockReturnValueOnce ( image )
61- . mockReturnValueOnce ( image )
62- . mockReturnValueOnce ( diffImage ) ,
58+ getImageMock : jest . fn ( ) . mockReturnValueOnce ( image ) . mockReturnValueOnce ( image ) . mockReturnValueOnce ( diffImage ) ,
6359 } ;
6460} ;
6561
6662describe ( 'VlmService' , ( ) => {
67-
6863 it ( 'should return NO_BASELINE_RESULT when pixelmatch returns no baseline' , async ( ) => {
6964 const pixelmatchGetDiffMock = jest . fn ( ) . mockResolvedValue ( NO_BASELINE_RESULT ) ;
7065 const service = await initService ( { pixelmatchGetDiffMock } ) ;
@@ -109,7 +104,10 @@ describe('VlmService', () => {
109104 ] ,
110105 [
111106 'keep unresolved when VLM confirms noticeable' ,
112- { identical : false , description : 'Button text changed from Submit to Send, and user count changed from 12 to 15.' } ,
107+ {
108+ identical : false ,
109+ description : 'Button text changed from Submit to Send, and user count changed from 12 to 15.' ,
110+ } ,
113111 TestStatus . unresolved ,
114112 { pixelMisMatchCount : 500 , diffPercent : 12.5 } ,
115113 ] ,
@@ -138,7 +136,11 @@ describe('VlmService', () => {
138136 } ) ;
139137
140138 it . each ( [
141- [ 'invalid JSON response' , { content : 'Invalid JSON response from model' } , { pixelMisMatchCount : 200 , diffPercent : 5 } ] ,
139+ [
140+ 'invalid JSON response' ,
141+ { content : 'Invalid JSON response from model' } ,
142+ { pixelMisMatchCount : 200 , diffPercent : 5 } ,
143+ ] ,
142144 [ 'API error' , null , { pixelMisMatchCount : 300 , diffPercent : 7.5 } ] ,
143145 ] ) ( 'should handle %s gracefully and return pixelmatch result' , async ( _ , vlmResponse , pixelmatchOverrides ) => {
144146 const pixelmatchResult = createPixelmatchResult ( pixelmatchOverrides ) ;
0 commit comments