Prettier and fix tests

This commit is contained in:
Daz DeBoer
2026-06-13 19:44:32 -06:00
parent cb8f8c9bc3
commit 79c65f4225
2 changed files with 4 additions and 17 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ const PROJECT_CACHE_COPY: Record<ProjectCacheStatus, string> = {
'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.`
}
/**
+3 -16
View File
@@ -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('</summary>'))
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', () => {