From d329484b052fe98f7e53b278c48b7c1255664339 Mon Sep 17 00:00:00 2001 From: Tim Haselaars Date: Wed, 1 Jan 2025 11:51:59 +0100 Subject: [PATCH] Updated overlay metrics --- CHANGELOG.md | 2 +- test/overlay.test.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 044ea77..eee4b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## unreleased -## [1.25.0] - 2025-01-02 +## [1.25.0] - 2025-01-01 - CLI - Added option to apply OpenAPI overlay actions diff --git a/test/overlay.test.js b/test/overlay.test.js index eab6118..06e2da3 100644 --- a/test/overlay.test.js +++ b/test/overlay.test.js @@ -61,7 +61,7 @@ describe('openapi-format CLI overlay tests', () => { const result = await openapiOverlay(baseOAS, { overlaySet }); expect(result.data).toHaveProperty('externalDocs', { url: 'https://docs.example.com' }); - expect(result.resultData.appliedActions).toBe(1); + expect(result.resultData.totalUsedActions).toBe(1); expect(result.resultData.unusedActions.length).toBe(0); }); @@ -132,7 +132,7 @@ describe('openapi-format CLI overlay tests', () => { const result = await openapiOverlay(baseOAS, { overlaySet }); expect(result.data).toHaveProperty('externalDocs', { url: 'https://docs.example.com' }); expect(result.resultData.totalActions).toBe(1); - expect(result.resultData.appliedActions).toBe(1); + expect(result.resultData.totalUsedActions).toBe(1); expect(result.resultData.unusedActions.length).toBe(0); }); @@ -149,7 +149,7 @@ describe('openapi-format CLI overlay tests', () => { const result = await openapiOverlay(baseOAS, { overlaySet }); expect(result.data).toEqual({}); expect(result.resultData.totalActions).toBe(3); - expect(result.resultData.appliedActions).toBe(2); + expect(result.resultData.totalUsedActions).toBe(2); expect(result.resultData.unusedActions.length).toBe(1); }); @@ -178,7 +178,7 @@ describe('openapi-format CLI overlay tests', () => { const result = await openapiOverlay(baseOAS, { overlaySet }); expect(result.resultData.unusedActions).toEqual(overlaySet.actions); expect(result.resultData.totalActions).toBe(1); - expect(result.resultData.appliedActions).toBe(0); + expect(result.resultData.totalUsedActions).toBe(0); }); it('should track unused, total, and applied actions correctly', async () => { @@ -192,7 +192,7 @@ describe('openapi-format CLI overlay tests', () => { const result = await openapiOverlay(baseOAS, { overlaySet }); expect(result.resultData.totalActions).toBe(2); - expect(result.resultData.appliedActions).toBe(1); + expect(result.resultData.totalUsedActions).toBe(1); expect(result.resultData.unusedActions.length).toBe(1); expect(result.resultData.unusedActions[0]).toEqual(overlaySet.actions[1]); });