mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 23:40:43 +00:00
17 lines
549 B
TypeScript
17 lines
549 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { CronJobStateSchema } from "../gateway/protocol/schema.js";
|
|
|
|
type SchemaLike = {
|
|
properties?: Record<string, unknown>;
|
|
deprecated?: boolean;
|
|
};
|
|
|
|
describe("cron protocol schema", () => {
|
|
it("marks the legacy lastStatus alias deprecated", () => {
|
|
const properties = (CronJobStateSchema as SchemaLike).properties ?? {};
|
|
const lastStatus = properties.lastStatus as SchemaLike | undefined;
|
|
expect(lastStatus).toBeDefined();
|
|
expect(lastStatus?.deprecated).toBe(true);
|
|
});
|
|
});
|