chore: Fix types in tests 21/N.

This commit is contained in:
cpojer
2026-02-17 12:22:17 +09:00
parent 18cc48dfd9
commit 245018fd6b
6 changed files with 48 additions and 20 deletions

View File

@@ -10,10 +10,16 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
running: false,
timer: null,
storeLoadedAtMs: Date.now(),
storeFileMtimeMs: null,
op: Promise.resolve(),
warnedDisabled: false,
deps: {
storePath: "/mock/path",
cronEnabled: true,
nowMs: () => Date.now(),
enqueueSystemEvent: () => {},
requestHeartbeatNow: () => {},
runIsolatedAgentJob: async () => ({ status: "ok" }),
log: {
debug: () => {},
info: () => {},
@@ -35,6 +41,7 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
schedule: { kind: "cron", expr: "0 8 * * *", tz: "UTC" },
payload: { kind: "systemEvent", text: "test" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: now - 3600_000,
updatedAtMs: now - 3600_000,
state: {
@@ -59,6 +66,7 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
schedule: { kind: "cron", expr: "0 8 * * *", tz: "UTC" },
payload: { kind: "systemEvent", text: "test" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: now,
updatedAtMs: now,
state: {
@@ -85,6 +93,7 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
schedule: { kind: "cron", expr: "0 8 * * *", tz: "UTC" },
payload: { kind: "systemEvent", text: "test" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: now,
updatedAtMs: now,
state: {
@@ -111,6 +120,7 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
schedule: { kind: "cron", expr: "0 8 * * *", tz: "UTC" },
payload: { kind: "systemEvent", text: "test" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: now,
updatedAtMs: now,
state: {
@@ -139,6 +149,7 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
schedule: { kind: "cron", expr: "0 8 * * *", tz: "UTC" },
payload: { kind: "systemEvent", text: "due" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: now - 3600_000,
updatedAtMs: now - 3600_000,
state: {
@@ -153,6 +164,7 @@ describe("issue #13992 regression - cron jobs skip execution", () => {
schedule: { kind: "cron", expr: "not a valid cron", tz: "UTC" },
payload: { kind: "systemEvent", text: "bad" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: now - 3600_000,
updatedAtMs: now - 3600_000,
state: {

View File

@@ -25,10 +25,16 @@ describe("issue #17852 - daily cron jobs should not skip days", () => {
running: false,
timer: null,
storeLoadedAtMs: nowMs,
storeFileMtimeMs: null,
op: Promise.resolve(),
warnedDisabled: false,
deps: {
storePath: "/mock/path",
cronEnabled: true,
nowMs: () => nowMs,
enqueueSystemEvent: () => {},
requestHeartbeatNow: () => {},
runIsolatedAgentJob: async () => ({ status: "ok" }),
log: {
debug: () => {},
info: () => {},
@@ -47,6 +53,7 @@ describe("issue #17852 - daily cron jobs should not skip days", () => {
schedule: { kind: "cron", expr: "0 3 * * *", tz: "UTC" },
payload: { kind: "systemEvent", text: "daily task" },
sessionTarget: "main",
wakeMode: "next-heartbeat",
createdAtMs: threeAM - DAY_MS,
updatedAtMs: threeAM - DAY_MS,
state: {