@@ -42,11 +42,8 @@ import wildcardContentSchemaMediaTypeCombinedWithSpecificMediaTypeAfter from './
4242import  shouldNotMissRemoveDiffForEnumEntryInOneOfBefore  from  './helper/resources/should-not-miss-remove-diff-for-enum-entry-in-oneOf/before.json' 
4343import  shouldNotMissRemoveDiffForEnumEntryInOneOfAfter  from  './helper/resources/should-not-miss-remove-diff-for-enum-entry-in-oneOf/after.json' 
4444
45- import  shouldCalculateDiffsCorrectlyInOneOfBefore  from  './helper/resources/should-calculate-diffs-correctly-in-oneOf/before.json' 
46- import  shouldCalculateDiffsCorrectlyInOneOfAfter  from  './helper/resources/should-calculate-diffs-correctly-in-oneOf/after.json' 
47- 
48- import  shouldCalculateDiffsCorrectlyInAnyOfBefore  from  './helper/resources/should-calculate-diffs-correctly-in-anyOf/before.json' 
49- import  shouldCalculateDiffsCorrectlyInAnyOfAfter  from  './helper/resources/should-calculate-diffs-correctly-in-anyOf/after.json' 
45+ import  shouldReportSingleDiffWhenRequiredPropertyIsChangedForTheCombinerBefore  from  './helper/resources/should-report-single-diff-when-required-property-is-changed-for-the-combiner/before.json' 
46+ import  shouldReportSingleDiffWhenRequiredPropertyIsChangedForTheCombinerAfter  from  './helper/resources/should-report-single-diff-when-required-property-is-changed-for-the-combiner/after.json' 
5047
5148import  {  diffsMatcher  }  from  './helper/matchers' 
5249import  {  TEST_DIFF_FLAG ,  TEST_ORIGINS_FLAG  }  from  './helper' 
@@ -278,39 +275,12 @@ describe('Real Data', () => {
278275  } ) 
279276
280277  // check diffUniquenessCache works correctly for oneOf 
281-   it ( 'should calculate diffs correctly in oneOf' ,  ( )  =>  { 
282-     const  before : any  =  shouldCalculateDiffsCorrectlyInOneOfBefore 
283-     const  after : any  =  shouldCalculateDiffsCorrectlyInOneOfAfter 
284-     const  {  diffs }  =  apiDiff ( before ,  after ,  OPTIONS ) 
285- 
286-     expect ( diffs ) . toEqual ( diffsMatcher ( [ 
287-       expect . objectContaining ( { 
288-         action : DiffAction . add , 
289-         afterValue : "eventType" , 
290-         afterNormalizedValue : "eventType" , 
291-         afterDeclarationPaths : [ [ 
292-           "paths" , 
293-           "/path1" , 
294-           "get" , 
295-           "responses" , 
296-           "200" , 
297-           "content" , 
298-           "application/json" , 
299-           "schema" , 
300-           "required" , 
301-           0 
302-         ] ] , 
303-         type : nonBreaking , 
304-       } ) , 
305-     ] ) ) 
306-   } ) 
307- 
308-   // check diffUniquenessCache works correctly for anyOf 
309-   it ( 'should calculate diffs correctly in anyOf' ,  ( )  =>  { 
310-     const  before : any  =  shouldCalculateDiffsCorrectlyInAnyOfBefore 
311-     const  after : any  =  shouldCalculateDiffsCorrectlyInAnyOfAfter 
278+   it ( 'should report single diff when required property is changed for the combiner' ,  ( )  =>  { 
279+     const  before : any  =  shouldReportSingleDiffWhenRequiredPropertyIsChangedForTheCombinerBefore 
280+     const  after : any  =  shouldReportSingleDiffWhenRequiredPropertyIsChangedForTheCombinerAfter 
312281    const  {  diffs }  =  apiDiff ( before ,  after ,  OPTIONS ) 
313282
283+     expect ( diffs ) . toHaveLength ( 1 ) 
314284    expect ( diffs ) . toEqual ( diffsMatcher ( [ 
315285      expect . objectContaining ( { 
316286        action : DiffAction . add , 
0 commit comments