1
0
Fork 0

Lint errors

pull/1028/head
Shubham Tiwari 2022-03-24 11:45:50 +05:30
parent ba1126827e
commit 31035de89b
2 changed files with 9 additions and 9 deletions

View File

@ -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)
})

View File

@ -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
}