


















@@ -69,9 +69,7 @@ describe("cron protocol conformance", () => {
6969for (const relPath of UI_FILES) {
7070const content = await fs.readFile(path.join(cwd, relPath), "utf-8");
7171for (const mode of modes) {
72-expect(content.includes(`"${mode}"`), `${relPath} missing delivery mode ${mode}`).toBe(
73-true,
74-);
72+expect(content, `${relPath} missing delivery mode ${mode}`).toContain(`"${mode}"`);
7573}
7674}
7775@@ -80,23 +78,23 @@ describe("cron protocol conformance", () => {
8078const content = await fs.readFile(path.join(cwd, relPath), "utf-8");
8179for (const mode of modes) {
8280const pattern = new RegExp(`\\bcase\\s+${mode}\\b`);
83-expect(pattern.test(content), `${relPath} missing case ${mode}`).toBe(true);
81+expect(content, `${relPath} missing case ${mode}`).toMatch(pattern);
8482}
8583}
8684});
87858886it("cron status shape matches gateway fields in UI + Swift", async () => {
8987const cwd = process.cwd();
9088const uiTypes = await fs.readFile(path.join(cwd, "ui/src/ui/types.ts"), "utf-8");
91-expect(uiTypes.includes("export type CronStatus")).toBe(true);
92-expect(uiTypes.includes("jobs:")).toBe(true);
93-expect(uiTypes.includes("jobCount")).toBe(false);
89+expect(uiTypes).toContain("export type CronStatus");
90+expect(uiTypes).toContain("jobs:");
91+expect(uiTypes).not.toContain("jobCount");
94929593const [swiftRelPath] = await resolveSwiftFiles(cwd, SWIFT_STATUS_CANDIDATES);
9694const swiftPath = path.join(cwd, swiftRelPath);
9795const swift = await fs.readFile(swiftPath, "utf-8");
98-expect(swift.includes("struct CronSchedulerStatus")).toBe(true);
99-expect(swift.includes("let jobs:")).toBe(true);
96+expect(swift).toContain("struct CronSchedulerStatus");
97+expect(swift).toContain("let jobs:");
10098});
10199102100it("cron job state schema keeps the full failover reason set", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。