mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 02:29:04 +08:00

* Added support to check if Artifact cache service is enabled or not. * enablingForGHES * added ACTIONS_CACHE_URL in fixtures * Fix CI * CI fix * changed function name * Function rename * Updated release * added test case * Update RELEASES.md * Lint errors * lint * linting * lint * update name to actions service * Update packages/cache/src/internal/cacheUtils.ts Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com> * review comments * linting * linting * push to start CI * Update RELEASES.md * remove extra spaces * reverting version update * Revert "reverting version update" This reverts commit af84eba61ef8c119458dc0ce1da85b01d61b9d13. * Update RELEASES.md Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
15 lines
416 B
TypeScript
15 lines
416 B
TypeScript
import * as cache from '../src/cache'
|
|
|
|
test('isFeatureAvailable returns true if server url is set', () => {
|
|
try {
|
|
process.env['ACTIONS_CACHE_URL'] = 'http://cache.com'
|
|
expect(cache.isFeatureAvailable()).toBe(true)
|
|
} finally {
|
|
delete process.env['ACTIONS_CACHE_URL']
|
|
}
|
|
})
|
|
|
|
test('isFeatureAvailable returns false if server url is not set', () => {
|
|
expect(cache.isFeatureAvailable()).toBe(false)
|
|
})
|