"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const __1 = require("..");
const runQuirrel_1 = require("../../api/test/runQuirrel");
const util_1 = require("./util");
test("cron timezone", async () => {
    var _a;
    const server = await (0, runQuirrel_1.run)("Mock");
    const quirrel = new __1.QuirrelClient({
        route: "",
        async handler() { },
        config: {
            quirrelBaseUrl: (0, util_1.getAddress)(server.server),
            encryptionSecret: "4ws8syoOgeQX6WFvXuUneGNwy7QvLxpk",
            applicationBaseUrl: `http://localhost:1234`,
        },
    });
    const job = await quirrel.enqueue(null, {
        repeat: {
            cron: ["@hourly", "Europe/Berlin"],
        },
    });
    const jobFromApi = await quirrel.getById(job.id);
    expect((_a = jobFromApi === null || jobFromApi === void 0 ? void 0 : jobFromApi.repeat) === null || _a === void 0 ? void 0 : _a.cronTimezone).toEqual("Europe/Berlin");
    server.teardown();
});
//# sourceMappingURL=cron-timezone.spec.js.map