Skip to content

Commit 37e3e89

Browse files
committed
test(release): unblock beta validation checks
1 parent 2f34d06 commit 37e3e89

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

extensions/feishu/src/test-support/lifecycle-test-support.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto";
33
import { createPluginRuntimeMock } from "openclaw/plugin-sdk/channel-test-helpers";
44
import { expect, vi, type Mock } from "vitest";
55
import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../../runtime-api.js";
6-
import { setFeishuRuntime } from "../runtime.js";
6+
import { getFeishuRuntime, setFeishuRuntime } from "../runtime.js";
77
import type { ResolvedFeishuAccount } from "../types.js";
88

99
const FEISHU_LIFECYCLE_WAIT_TIMEOUT_MS = 10_000;
@@ -437,6 +437,9 @@ export async function setupFeishuLifecycleHandler(params: {
437437
} else {
438438
params.createEventDispatcherMock.mockReturnValue({ register });
439439
}
440+
getFeishuRuntime().config.current = vi.fn(
441+
() => params.cfg,
442+
) as unknown as PluginRuntime["config"]["current"];
440443

441444
const monitorSingleAccount = await loadMonitorSingleAccount();
442445
await monitorSingleAccount({

src/gateway/session-transcript-files.fs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export async function resolveSessionTranscriptResetArchiveCandidatesAsync(
371371
).flatMap((identityArchives) =>
372372
identityArchives
373373
.flatMap((archive) => (archive ? [archive] : []))
374-
.sort(
374+
.toSorted(
375375
(left, right) => right.timestamp - left.timestamp || right.name.localeCompare(left.name),
376376
)
377377
.slice(0, 1),

src/gateway/session-utils.fs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ describe("readSessionMessages", () => {
839839
]);
840840
clearSessionTranscriptIndexCache();
841841

842-
const originalReaddir = fs.promises.readdir.bind(fs.promises) as typeof fs.promises.readdir;
842+
const originalReaddir = fs.promises.readdir.bind(fs.promises);
843843
let wroteActiveTranscript = false;
844844
const readdirSpy = vi.spyOn(fs.promises, "readdir").mockImplementation((async (
845845
...args: unknown[]

0 commit comments

Comments
 (0)