mirror of
https://github.com/gradle/actions.git
synced 2026-06-14 07:30:41 +00:00
Prettier and fix tests
This commit is contained in:
@@ -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.`
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user