mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 18:09:06 +08:00
Lint errors
This commit is contained in:
parent
ba1126827e
commit
31035de89b
16
packages/cache/__tests__/cacheUtils.test.ts
vendored
16
packages/cache/__tests__/cacheUtils.test.ts
vendored
@ -33,16 +33,16 @@ test('assertDefined returns value', () => {
|
||||
expect(cacheUtils.assertDefined('test', 5)).toBe(5)
|
||||
})
|
||||
|
||||
test("isFeatureAvailable returns true if server url is set", () => {
|
||||
test('isFeatureAvailable returns true if server url is set', () => {
|
||||
try {
|
||||
process.env["ACTIONS_CACHE_URL"] = "http://cache.com";
|
||||
expect(cacheUtils.isFeatureAvailable()).toBe(true);
|
||||
process.env['ACTIONS_CACHE_URL'] = 'http://cache.com'
|
||||
expect(cacheUtils.isFeatureAvailable()).toBe(true)
|
||||
} finally {
|
||||
delete process.env["ACTIONS_CACHE_URL"]
|
||||
delete process.env['ACTIONS_CACHE_URL']
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
test("isFeatureAvailable returns false if server url is not set", () => {
|
||||
expect(cacheUtils.isFeatureAvailable()).toBe(false);
|
||||
});
|
||||
test('isFeatureAvailable returns false if server url is not set', () => {
|
||||
expect(cacheUtils.isFeatureAvailable()).toBe(false)
|
||||
})
|
||||
|
||||
|
2
packages/cache/src/internal/cacheUtils.ts
vendored
2
packages/cache/src/internal/cacheUtils.ts
vendored
@ -125,7 +125,7 @@ export function assertDefined<T>(name: string, value?: T): T {
|
||||
}
|
||||
|
||||
export function isFeatureAvailable(): boolean {
|
||||
if (process.env["ACTIONS_CACHE_URL"]) {
|
||||
if (process.env['ACTIONS_CACHE_URL']) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user