"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const __1 = require("..");
describe("schema-check", () => {
    const quirrel = new __1.QuirrelClient({
        async handler() { },
        route: "api/someAPI",
        config: {
            encryptionSecret: "4ws8syoOgeQX6WFvXuUneGNwy7QvLxpk",
            applicationBaseUrl: "https://anysite.com",
        },
    });
    it("catches Firebase-style dates", async () => {
        await expect(async () => {
            await quirrel.enqueue(null, {
                runAt: {
                    _seconds: 1608164625,
                    _nanoseconds: 119000000,
                },
            });
        }).rejects.toThrowError("Expected date, received object");
    });
    it("catches non-vercel/ms-compliant delays", async () => {
        await expect(async () => {
            await quirrel.enqueue(null, {
                delay: "10 shreks",
            });
        }).rejects.toThrowError("Please provide a valid time span, according to https://github.com/vercel/ms");
    });
});
//# sourceMappingURL=schema-checks.test.js.map