2
0
mirror of https://github.com/tenrok/vue-cron-editor-bootstrap.git synced 2026-06-02 16:14:05 +03:00
Files
vue-cron-editor-bootstrap/tests/unit/parseExpression.spec.ts
T
Alex Freitas cd320bb0ac Firts version
2020-05-21 15:42:12 -03:00

20 lines
529 B
TypeScript

import { parseExpression } from "../../src/components/core/cronExpressions";
test("parse week expression", () => {
expect(parseExpression("4 4 * * 0,2,3,5")).toStrictEqual({
type: "weekly",
hours: 4,
minutes: 4,
days: ["0", "2", "3", "5"]
});
});
test("parse all week days expression", () => {
expect(parseExpression("4 4 * * 0,1,2,3,4,5,6")).toStrictEqual({
type: "weekly",
hours: 4,
minutes: 4,
days: ["0", "1", "2", "3", "4", "5", "6"]
});
});