mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-08 02:52:15 +00:00
test(release): unblock beta validation checks
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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[]
|
||||
|
||||
Reference in New Issue
Block a user