@@ -491,7 +491,7 @@ describe('TestRunsService', () => {
491491 baseline ,
492492 image ,
493493 testRun . diffTollerancePercent ,
494- testVariation . ignoreAreas
494+ JSON . parse ( testVariation . ignoreAreas )
495495 ) ;
496496 expect ( getImageMock ) . toHaveBeenNthCalledWith ( 1 , testVariation . baselineName ) ;
497497 expect ( getImageMock ) . toHaveBeenNthCalledWith ( 2 , imageName ) ;
@@ -523,7 +523,12 @@ describe('TestRunsService', () => {
523523 status : TestStatus . new ,
524524 } ,
525525 } ) ;
526- expect ( getDiffMock ) . toHaveBeenCalledWith ( baseline , image , testRun . diffTollerancePercent , testRun . ignoreAreas ) ;
526+ expect ( getDiffMock ) . toHaveBeenCalledWith (
527+ baseline ,
528+ image ,
529+ testRun . diffTollerancePercent ,
530+ JSON . parse ( testRun . ignoreAreas )
531+ ) ;
527532 expect ( saveDiffResultMock ) . toHaveBeenCalledWith ( testRun . id , diffResult ) ;
528533 expect ( eventTestRunCreatedMock ) . toHaveBeenCalledWith ( testRunWithResult ) ;
529534 expect ( result ) . toBe ( testRunWithResult ) ;
@@ -538,7 +543,7 @@ describe('TestRunsService', () => {
538543 } ) ;
539544 service = await initService ( { } ) ;
540545
541- const result = service . getDiff ( baseline , image , 0 , '[]' ) ;
546+ const result = service . getDiff ( baseline , image , 0 , [ ] ) ;
542547
543548 expect ( result ) . toStrictEqual ( {
544549 status : undefined ,
@@ -560,7 +565,7 @@ describe('TestRunsService', () => {
560565 } ) ;
561566 service = await initService ( { } ) ;
562567
563- const result = service . getDiff ( baseline , image , 0 , '[]' ) ;
568+ const result = service . getDiff ( baseline , image , 0 , [ ] ) ;
564569
565570 expect ( result ) . toStrictEqual ( {
566571 status : TestStatus . unresolved ,
@@ -583,7 +588,7 @@ describe('TestRunsService', () => {
583588 service = await initService ( { } ) ;
584589 mocked ( Pixelmatch ) . mockReturnValueOnce ( 0 ) ;
585590
586- const result = service . getDiff ( baseline , image , 0 , '[]' ) ;
591+ const result = service . getDiff ( baseline , image , 0 , [ ] ) ;
587592
588593 expect ( result ) . toStrictEqual ( {
589594 status : TestStatus . ok ,
@@ -608,7 +613,7 @@ describe('TestRunsService', () => {
608613 const pixelMisMatchCount = 150 ;
609614 mocked ( Pixelmatch ) . mockReturnValueOnce ( pixelMisMatchCount ) ;
610615
611- const result = service . getDiff ( baseline , image , 1.5 , '[]' ) ;
616+ const result = service . getDiff ( baseline , image , 1.5 , [ ] ) ;
612617
613618 expect ( saveImageMock ) . toHaveBeenCalledTimes ( 0 ) ;
614619 expect ( result ) . toStrictEqual ( {
@@ -637,7 +642,7 @@ describe('TestRunsService', () => {
637642 saveImageMock,
638643 } ) ;
639644
640- const result = service . getDiff ( baseline , image , 1 , '[]' ) ;
645+ const result = service . getDiff ( baseline , image , 1 , [ ] ) ;
641646
642647 expect ( saveImageMock ) . toHaveBeenCalledTimes ( 1 ) ;
643648 expect ( result ) . toStrictEqual ( {
@@ -689,7 +694,7 @@ describe('TestRunsService', () => {
689694 baselineMock ,
690695 imageeMock ,
691696 testRun . diffTollerancePercent ,
692- testRun . ignoreAreas
697+ JSON . parse ( testRun . ignoreAreas )
693698 ) ;
694699 expect ( service . emitUpdateBuildEvent ) . toBeCalledWith ( testRun . buildId ) ;
695700 } ) ;
0 commit comments