test(release): unblock beta validation checks

This commit is contained in:
Vincent Koc
2026-06-14 18:02:38 +08:00
parent 2f34d06b42
commit 37e3e895b0
3 changed files with 6 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto";
import { createPluginRuntimeMock } from "openclaw/plugin-sdk/channel-test-helpers";
import { expect, vi, type Mock } from "vitest";
import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../../runtime-api.js";
import { setFeishuRuntime } from "../runtime.js";
import { getFeishuRuntime, setFeishuRuntime } from "../runtime.js";
import type { ResolvedFeishuAccount } from "../types.js";
const FEISHU_LIFECYCLE_WAIT_TIMEOUT_MS = 10_000;
@@ -437,6 +437,9 @@ export async function setupFeishuLifecycleHandler(params: {
} else {
params.createEventDispatcherMock.mockReturnValue({ register });
}
getFeishuRuntime().config.current = vi.fn(
() => params.cfg,
) as unknown as PluginRuntime["config"]["current"];
const monitorSingleAccount = await loadMonitorSingleAccount();
await monitorSingleAccount({

View File

@@ -371,7 +371,7 @@ export async function resolveSessionTranscriptResetArchiveCandidatesAsync(
).flatMap((identityArchives) =>
identityArchives
.flatMap((archive) => (archive ? [archive] : []))
.sort(
.toSorted(
(left, right) => right.timestamp - left.timestamp || right.name.localeCompare(left.name),
)
.slice(0, 1),

View File

@@ -839,7 +839,7 @@ describe("readSessionMessages", () => {
]);
clearSessionTranscriptIndexCache();
const originalReaddir = fs.promises.readdir.bind(fs.promises) as typeof fs.promises.readdir;
const originalReaddir = fs.promises.readdir.bind(fs.promises);
let wroteActiveTranscript = false;
const readdirSpy = vi.spyOn(fs.promises, "readdir").mockImplementation((async (
...args: unknown[]