mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-08 03:22:55 +00:00
fix(ci): repair current test type fixtures
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { resolveFeishuSenderName } from "./bot-sender-name.js";
|
||||
import { FeishuConfigSchema } from "./config-schema.js";
|
||||
import type { ResolvedFeishuAccount } from "./types.js";
|
||||
|
||||
const createFeishuClientMock = vi.hoisted(() => vi.fn());
|
||||
@@ -16,7 +17,7 @@ const account = {
|
||||
appId: "app-id",
|
||||
appSecret: "secret",
|
||||
domain: "feishu",
|
||||
config: {},
|
||||
config: FeishuConfigSchema.parse({}),
|
||||
} satisfies ResolvedFeishuAccount;
|
||||
|
||||
function mockUserNames(...names: string[]): ReturnType<typeof vi.fn> {
|
||||
|
||||
@@ -45,10 +45,13 @@ function setResolvedSessionKeyCache(
|
||||
resolvedSessionKeyByRunId.delete(oldest);
|
||||
}
|
||||
}
|
||||
const expiresAt =
|
||||
sessionKey === null ? resolveExpiresAtMsFromDurationMs(RUN_LOOKUP_MISS_TTL_MS) : null;
|
||||
if (sessionKey === null && expiresAt === undefined) {
|
||||
return;
|
||||
let expiresAt: number | null = null;
|
||||
if (sessionKey === null) {
|
||||
const missExpiresAt = resolveExpiresAtMsFromDurationMs(RUN_LOOKUP_MISS_TTL_MS);
|
||||
if (missExpiresAt === undefined) {
|
||||
return;
|
||||
}
|
||||
expiresAt = missExpiresAt;
|
||||
}
|
||||
resolvedSessionKeyByRunId.set(cacheKey, {
|
||||
sessionKey,
|
||||
|
||||
Reference in New Issue
Block a user