|
1 | | -import { annotation, apiDiff, breaking, ClassifierType, CompareOptions, DiffAction, nonBreaking, unclassified } from '../src' |
| 1 | +import { annotation, apiDiff, ClassifierType, CompareOptions, DiffAction, nonBreaking, unclassified } from '../src' |
2 | 2 | import offeringQualificationBefore from './helper/resources/api-v2-offeringqualification-qualification-post/before.json' |
3 | 3 | import offeringQualificationAfter from './helper/resources/api-v2-offeringqualification-qualification-post/after.json' |
4 | 4 | import readDefaultValueOfRequiredBefore from './helper/resources/read-default-value-of-required-field/before.json' |
@@ -30,9 +30,6 @@ import spearedParamsAfter from './helper/resources/speared-parameters/after.json |
30 | 30 | import wildcardContentSchemaMediaTypeCombinedWithSpecificMediaTypeBefore from './helper/resources/wildcard-content-schema-media-type-combined-with-specific-media-type/before.json' |
31 | 31 | import wildcardContentSchemaMediaTypeCombinedWithSpecificMediaTypeAfter from './helper/resources/wildcard-content-schema-media-type-combined-with-specific-media-type/after.json' |
32 | 32 |
|
33 | | -import shouldNotMissRemoveDiffForEnumEntryInOneOfBefore from './helper/resources/should-not-miss-remove-diff-for-enum-entry-in-oneOf/before.json' |
34 | | -import shouldNotMissRemoveDiffForEnumEntryInOneOfAfter from './helper/resources/should-not-miss-remove-diff-for-enum-entry-in-oneOf/after.json' |
35 | | - |
36 | 33 | import { diffsMatcher } from './helper/matchers' |
37 | 34 | import { TEST_DIFF_FLAG, TEST_ORIGINS_FLAG } from './helper' |
38 | 35 | import { JSON_SCHEMA_NODE_SYNTHETIC_TYPE_NOTHING } from '@netcracker/qubership-apihub-api-unifier' |
@@ -230,35 +227,4 @@ describe('Real Data', () => { |
230 | 227 | }), |
231 | 228 | ])) |
232 | 229 | }) |
233 | | - |
234 | | - it('should not miss remove diff for enum entry in oneOf', () => { |
235 | | - const before: any = shouldNotMissRemoveDiffForEnumEntryInOneOfBefore |
236 | | - const after: any = shouldNotMissRemoveDiffForEnumEntryInOneOfAfter |
237 | | - const { merged } = apiDiff(before, after, OPTIONS) |
238 | | - |
239 | | - expect( |
240 | | - Object.values((merged as any).paths['/path1'].post.requestBody.content['application/json'].schema.oneOf[1].properties.scope.items.enum[TEST_DIFF_FLAG]) |
241 | | - ).toEqual(diffsMatcher([ |
242 | | - expect.objectContaining({ |
243 | | - beforeValue: 'query', |
244 | | - action: DiffAction.remove, |
245 | | - type: breaking, |
246 | | - }), |
247 | | - expect.objectContaining({ |
248 | | - beforeValue: 'subscription', |
249 | | - action: DiffAction.remove, |
250 | | - type: breaking, |
251 | | - }), |
252 | | - expect.objectContaining({ |
253 | | - afterValue: 'argument', |
254 | | - action: DiffAction.add, |
255 | | - type: nonBreaking, |
256 | | - }), |
257 | | - expect.objectContaining({ |
258 | | - afterValue: 'annotation', |
259 | | - action: DiffAction.add, |
260 | | - type: nonBreaking, |
261 | | - }), |
262 | | - ])) |
263 | | - }) |
264 | 230 | }) |
0 commit comments