From 79c65f4225e487ddedbde69e18aefd24f378e367 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Sat, 13 Jun 2026 19:44:32 -0600 Subject: [PATCH] Prettier and fix tests --- sources/src/caching-report.ts | 2 +- sources/test/jest/caching-report.test.ts | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/sources/src/caching-report.ts b/sources/src/caching-report.ts index 720ae251..a690c2a9 100644 --- a/sources/src/caching-report.ts +++ b/sources/src/caching-report.ts @@ -32,7 +32,7 @@ const PROJECT_CACHE_COPY: Record = { 'not-enabled': ``, 'trial-expired': `Project state (build-logic and configuration cache) was not cached — the Develocity caching trial has expired.`, 'trial-not-licensed': `Project state (build-logic and configuration cache) was not cached — a valid Develocity trial token is required.`, - 'enabled': `Caching of project state (build-logic and configuration cache) was enabled.` + enabled: `Caching of project state (build-logic and configuration cache) was enabled.` } /** diff --git a/sources/test/jest/caching-report.test.ts b/sources/test/jest/caching-report.test.ts index f20facfb..db7c926c 100644 --- a/sources/test/jest/caching-report.test.ts +++ b/sources/test/jest/caching-report.test.ts @@ -83,30 +83,17 @@ describe('renderCachingReport', () => { const report: CacheReport = { status: 'enabled', cleanup: 'enabled', - projectCache: 'restored', + projectCache: 'enabled', entries: [entry()] } const md = renderCachingReport(report, ENHANCED) const detailsBody = md.slice(md.indexOf('')) expect(detailsBody).toContain( - 'Project state (build-logic and configuration cache) was restored from the cache.' + 'Caching of project state (build-logic and configuration cache) was enabled.' ) }) - it('explains an omitted configuration cache with a link to the encryption key docs', () => { - const report: CacheReport = { - status: 'enabled', - cleanup: 'enabled', - projectCache: 'stored-no-configuration-cache', - entries: [entry()] - } - const md = renderCachingReport(report, ENHANCED) - - expect(md).toContain('Build-logic state was cached.') - expect(md).toContain('#cache-encryption-key') - }) - it('renders nothing for the not-enabled project-cache status', () => { const report: CacheReport = { status: 'enabled', @@ -117,7 +104,7 @@ describe('renderCachingReport', () => { const md = renderCachingReport(report, ENHANCED) expect(md).not.toContain('Project state') - expect(md).not.toContain('Build-logic state') + expect(md).not.toContain('build-logic') }) it('omits the project-cache line when the status is absent', () => {