Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
josephkmh committed Oct 19, 2022
1 parent 3b9b52c commit eaefaeb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions airbyte-webapp/src/utils/cron/validateCronExpression.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ describe("validateCronExpression", () => {

describe("validateCronFrequencyOverOneHour", () => {
it.each`
expression | isValid
${"0 0 12 * * ?"} | ${true}
${"0 0 * * * ?"} | ${true}
${"0 * 12 * * ?"} | ${false}
${"* * 12 * * ?"} | ${false}
expression | isValid
${"0 0 12 * * ?"} | ${true}
${"0 0 * * * ?"} | ${true}
${"0 * 12 * * ?"} | ${false}
${"* * 12 * * ?"} | ${false}
${"15,45 * 12 * * ?"} | ${false}
${"0 15,45 12 * * ?"} | ${false}
`("'$expression' is valid: $isValid", ({ expression, isValid }) => {
expect(validateCronFrequencyOneHourOrMore(expression)).toEqual(isValid);
});
Expand Down

0 comments on commit eaefaeb

Please sign in to comment.