mirror of https://github.com/actions/toolkit
Lint errors
parent
ba1126827e
commit
31035de89b
|
@ -33,16 +33,16 @@ test('assertDefined returns value', () => {
|
||||||
expect(cacheUtils.assertDefined('test', 5)).toBe(5)
|
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 {
|
try {
|
||||||
process.env["ACTIONS_CACHE_URL"] = "http://cache.com";
|
process.env['ACTIONS_CACHE_URL'] = 'http://cache.com'
|
||||||
expect(cacheUtils.isFeatureAvailable()).toBe(true);
|
expect(cacheUtils.isFeatureAvailable()).toBe(true)
|
||||||
} finally {
|
} finally {
|
||||||
delete process.env["ACTIONS_CACHE_URL"]
|
delete process.env['ACTIONS_CACHE_URL']
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
test("isFeatureAvailable returns false if server url is not set", () => {
|
test('isFeatureAvailable returns false if server url is not set', () => {
|
||||||
expect(cacheUtils.isFeatureAvailable()).toBe(false);
|
expect(cacheUtils.isFeatureAvailable()).toBe(false)
|
||||||
});
|
})
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ export function assertDefined<T>(name: string, value?: T): T {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isFeatureAvailable(): boolean {
|
export function isFeatureAvailable(): boolean {
|
||||||
if (process.env["ACTIONS_CACHE_URL"]) {
|
if (process.env['ACTIONS_CACHE_URL']) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue