mirror of
https://github.com/Azure/k8s-set-context.git
synced 2026-06-25 16:29:27 +08:00
Vidya reddy pretty code (#53)
* updated action file with node16 * Code consistency using prettier and its workflow * Enforce Prettier * code fix * code fix * code fix Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com>
This commit is contained in:
+20
-20
@@ -1,24 +1,24 @@
|
||||
import { Cluster, parseCluster } from "./cluster";
|
||||
import {Cluster, parseCluster} from './cluster'
|
||||
|
||||
describe("Cluster type", () => {
|
||||
test("it has required values", () => {
|
||||
const vals = <any>Object.values(Cluster);
|
||||
expect(vals.includes("arc")).toBe(true);
|
||||
expect(vals.includes("generic")).toBe(true);
|
||||
});
|
||||
describe('Cluster type', () => {
|
||||
test('it has required values', () => {
|
||||
const vals = <any>Object.values(Cluster)
|
||||
expect(vals.includes('arc')).toBe(true)
|
||||
expect(vals.includes('generic')).toBe(true)
|
||||
})
|
||||
|
||||
test("it can parse valid values from a string", () => {
|
||||
expect(parseCluster("arc")).toBe(Cluster.ARC);
|
||||
expect(parseCluster("Arc")).toBe(Cluster.ARC);
|
||||
expect(parseCluster("ARC")).toBe(Cluster.ARC);
|
||||
test('it can parse valid values from a string', () => {
|
||||
expect(parseCluster('arc')).toBe(Cluster.ARC)
|
||||
expect(parseCluster('Arc')).toBe(Cluster.ARC)
|
||||
expect(parseCluster('ARC')).toBe(Cluster.ARC)
|
||||
|
||||
expect(parseCluster("generic")).toBe(Cluster.GENERIC);
|
||||
expect(parseCluster("Generic")).toBe(Cluster.GENERIC);
|
||||
expect(parseCluster("GENERIC")).toBe(Cluster.GENERIC);
|
||||
});
|
||||
expect(parseCluster('generic')).toBe(Cluster.GENERIC)
|
||||
expect(parseCluster('Generic')).toBe(Cluster.GENERIC)
|
||||
expect(parseCluster('GENERIC')).toBe(Cluster.GENERIC)
|
||||
})
|
||||
|
||||
test("it will return undefined if it can't parse values from a string", () => {
|
||||
expect(parseCluster("invalid")).toBe(undefined);
|
||||
expect(parseCluster("unsupportedType")).toBe(undefined);
|
||||
});
|
||||
});
|
||||
test("it will return undefined if it can't parse values from a string", () => {
|
||||
expect(parseCluster('invalid')).toBe(undefined)
|
||||
expect(parseCluster('unsupportedType')).toBe(undefined)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user