Vidya reddy/prettier code (#203)

This commit is contained in:
Vidya
2022-06-24 13:57:45 -07:00
committed by GitHub
parent 976c5c4981
commit dcd9bc6b1a
71 changed files with 16044 additions and 15876 deletions
+19 -19
View File
@@ -1,22 +1,22 @@
import { Action, parseAction } from "./action";
import {Action, parseAction} from './action'
describe("Action type", () => {
test("it has required values", () => {
const vals = <any>Object.values(Action);
expect(vals.includes("deploy")).toBe(true);
expect(vals.includes("promote")).toBe(true);
expect(vals.includes("reject")).toBe(true);
});
describe('Action type', () => {
test('it has required values', () => {
const vals = <any>Object.values(Action)
expect(vals.includes('deploy')).toBe(true)
expect(vals.includes('promote')).toBe(true)
expect(vals.includes('reject')).toBe(true)
})
test("it can parse valid values from a string", () => {
expect(parseAction("deploy")).toBe(Action.DEPLOY);
expect(parseAction("Deploy")).toBe(Action.DEPLOY);
expect(parseAction("DEPLOY")).toBe(Action.DEPLOY);
expect(parseAction("deploY")).toBe(Action.DEPLOY);
});
test('it can parse valid values from a string', () => {
expect(parseAction('deploy')).toBe(Action.DEPLOY)
expect(parseAction('Deploy')).toBe(Action.DEPLOY)
expect(parseAction('DEPLOY')).toBe(Action.DEPLOY)
expect(parseAction('deploY')).toBe(Action.DEPLOY)
})
test("it will return undefined if it can't parse values from a string", () => {
expect(parseAction("invalid")).toBe(undefined);
expect(parseAction("unsupportedType")).toBe(undefined);
});
});
test("it will return undefined if it can't parse values from a string", () => {
expect(parseAction('invalid')).toBe(undefined)
expect(parseAction('unsupportedType')).toBe(undefined)
})
})