Skip to content

Commit 396a550

Browse files
committed
feat: Review
1 parent bfb27a2 commit 396a550

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

test/apiKinds.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ describe('Check Api Compatibility Function tests', () => {
174174
const API_KIND_BWC_LABEL = 'apihub/x-api-kind: BWC'
175175

176176
describe('Publish ApiKind version Labels tests', () => {
177-
test('should apply api kind version label from previous document', async () => {
177+
test('should apply api kind version label from previous version', async () => {
178178
const result = await runApiKindTest(
179179
'api-kinds/no-api-kind-in-documents', [], [], [API_KIND_NO_BWC_LABEL],
180180
)
181181
expect(result).toEqual(changesSummaryMatcher({ [RISKY_CHANGE_TYPE]: 1 }))
182182
})
183183

184-
test('should apply api kind version label from current document', async () => {
184+
test('should apply api kind version label from current version', async () => {
185185
const result = await runApiKindTest(
186186
'api-kinds/no-api-kind-in-documents', [], [], [], [API_KIND_NO_BWC_LABEL],
187187
)
@@ -202,12 +202,12 @@ describe('Check Api Compatibility Function tests', () => {
202202
})
203203

204204
describe('ApiKind info section tests', () => {
205-
test('should apply api-kind label in previous document info section', async () => {
205+
test('should apply api-kind property in previous document info section', async () => {
206206
const result = await runApiKindTest('api-kinds/no-bwc-api-kind-info-label-in-prev-document')
207207
expect(result).toEqual(changesSummaryMatcher({ [RISKY_CHANGE_TYPE]: 1 }))
208208
})
209209

210-
test('should apply api-kind label in current document info section', async () => {
210+
test('should apply api-kind property in current document info section', async () => {
211211
const result = await runApiKindTest('api-kinds/no-bwc-api-kind-info-label-in-curr-document')
212212
expect(result).toEqual(changesSummaryMatcher({ [RISKY_CHANGE_TYPE]: 1 }))
213213
})
@@ -232,14 +232,14 @@ describe('Check Api Compatibility Function tests', () => {
232232
})
233233

234234
describe('Publish ApiKind Priority tests', () => {
235-
test('should prioritize version label no-BWC api kind over file label BWC in previous version', async () => {
235+
test('should prioritize file label BWC api kind over version label no-BWC in previous version', async () => {
236236
const result = await runApiKindTest(
237237
'api-kinds/no-api-kind-in-documents', [API_KIND_BWC_LABEL], [], [API_KIND_NO_BWC_LABEL],
238238
)
239239
expect(result).toEqual(changesSummaryMatcher({ [BREAKING_CHANGE_TYPE]: 1 }))
240240
})
241241

242-
test('should prioritize version label no-BWC api kind over file label BWC in current version', async () => {
242+
test('should prioritize file label BWC api kind over version label no-BWC in current version', async () => {
243243
const result = await runApiKindTest(
244244
'api-kinds/no-api-kind-in-documents', [], [API_KIND_BWC_LABEL], [], [API_KIND_NO_BWC_LABEL],
245245
)
@@ -260,28 +260,28 @@ describe('Check Api Compatibility Function tests', () => {
260260
expect(result).toEqual(changesSummaryMatcher({ [RISKY_CHANGE_TYPE]: 1 }))
261261
})
262262

263-
test('should prioritize info label no-BWC api kind over version label BWC in previous version', async () => {
263+
test('should prioritize info property no-BWC api kind over version label BWC in previous version', async () => {
264264
const result = await runApiKindTest(
265265
'api-kinds/no-bwc-api-kind-info-label-in-prev-document', [API_KIND_BWC_LABEL], [], [API_KIND_BWC_LABEL],
266266
)
267267
expect(result).toEqual(changesSummaryMatcher({ [RISKY_CHANGE_TYPE]: 1 }))
268268
})
269269

270-
test('should prioritize info label no-BWC api kind over version label BWC in current version', async () => {
270+
test('should prioritize info property no-BWC api kind over version label BWC in current version', async () => {
271271
const result = await runApiKindTest(
272272
'api-kinds/no-bwc-api-kind-info-label-in-curr-document', [], [API_KIND_BWC_LABEL], [], [API_KIND_BWC_LABEL],
273273
)
274274
expect(result).toEqual(changesSummaryMatcher({ [RISKY_CHANGE_TYPE]: 1 }))
275275
})
276276

277-
test('should prioritize previous info label as BWC when info api-kind overrides no-BWC publish labels', async () => {
277+
test('should prioritize previous info property as BWC when info api-kind overrides no-BWC publish labels', async () => {
278278
const result = await runApiKindTest(
279279
'api-kinds/bwc-api-kind-info-label-in-prev-document', [API_KIND_NO_BWC_LABEL], [], [API_KIND_NO_BWC_LABEL],
280280
)
281281
expect(result).toEqual(changesSummaryMatcher({ [BREAKING_CHANGE_TYPE]: 1 }))
282282
})
283283

284-
test('should prioritize current info label as BWC when info api kind overrides no-BWC publish labels', async () => {
284+
test('should prioritize current info property as BWC when info api kind overrides no-BWC publish labels', async () => {
285285
const result = await runApiKindTest(
286286
'api-kinds/bwc-api-kind-info-label-in-curr-document', [], [API_KIND_NO_BWC_LABEL], [], [API_KIND_NO_BWC_LABEL],
287287
)
@@ -290,7 +290,7 @@ describe('Check Api Compatibility Function tests', () => {
290290

291291
test('should prioritize previous operation-level BWC api kind over current no-BWC publish labels', async () => {
292292
const result = await runApiKindTest(
293-
'api-kinds/bwc-api-kind-operation-label-prev-document', [], [API_KIND_NO_BWC_LABEL], [], [API_KIND_NO_BWC_LABEL],
293+
'api-kinds/bwc-api-kind-operation-label-prev-document', [API_KIND_NO_BWC_LABEL], [], [API_KIND_NO_BWC_LABEL],
294294
)
295295
expect(result).toEqual(changesSummaryMatcher({
296296
[BREAKING_CHANGE_TYPE]: 1,
@@ -308,16 +308,16 @@ describe('Check Api Compatibility Function tests', () => {
308308
}))
309309
})
310310

311-
test('should prioritize current operation-level no-BWC api kind over current BWC info label', async () => {
312-
const result = await runApiKindTest('api-kinds/double-api-kind-info-label-in-curr-document')
311+
test('should prioritize current operation-level no-BWC api kind over current BWC info property', async () => {
312+
const result = await runApiKindTest('api-kinds/info-bwc-operation-noBWC-in-curr-document')
313313
expect(result).toEqual(changesSummaryMatcher({
314314
[RISKY_CHANGE_TYPE]: 1,
315315
[UNCLASSIFIED_CHANGE_TYPE]: 1, // x-api-kind field in the operation also gives a diff
316316
}))
317317
})
318318

319-
test('should prioritize current operation-level no-BWC api kind over previous BWC info label', async () => {
320-
const result = await runApiKindTest('api-kinds/double-api-kind-info-label-in-prev-document')
319+
test('should prioritize current operation-level no-BWC api kind over previous BWC info property', async () => {
320+
const result = await runApiKindTest('api-kinds/info-bwc-operation-noBWC-in-prev-document')
321321
expect(result).toEqual(changesSummaryMatcher({
322322
[RISKY_CHANGE_TYPE]: 1,
323323
[UNCLASSIFIED_CHANGE_TYPE]: 1, // x-api-kind field in the operation also gives a diff

test/projects/api-kinds/double-api-kind-info-label-in-curr-document/1.yaml renamed to test/projects/api-kinds/info-bwc-operation-noBWC-in-curr-document/1.yaml

File renamed without changes.

test/projects/api-kinds/double-api-kind-info-label-in-curr-document/2.yaml renamed to test/projects/api-kinds/info-bwc-operation-noBWC-in-curr-document/2.yaml

File renamed without changes.

test/projects/api-kinds/double-api-kind-info-label-in-curr-document/config.json renamed to test/projects/api-kinds/info-bwc-operation-noBWC-in-curr-document/config.json

File renamed without changes.

test/projects/api-kinds/double-api-kind-info-label-in-prev-document/1.yaml renamed to test/projects/api-kinds/info-bwc-operation-noBWC-in-prev-document/1.yaml

File renamed without changes.

test/projects/api-kinds/double-api-kind-info-label-in-prev-document/2.yaml renamed to test/projects/api-kinds/info-bwc-operation-noBWC-in-prev-document/2.yaml

File renamed without changes.

test/projects/api-kinds/double-api-kind-info-label-in-prev-document/config.json renamed to test/projects/api-kinds/info-bwc-operation-noBWC-in-prev-document/config.json

File renamed without changes.

0 commit comments

Comments
 (0)