Skip to content

Commit 8efdc2a

Browse files
committed
test: sync PR with current CI gates
1 parent 8f12628 commit 8efdc2a

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

extensions/elevenlabs/speech-provider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ describe("elevenlabs speech provider", () => {
195195

196196
await provider.synthesize?.({
197197
text: "hello",
198-
target: "audio",
198+
target: "audio-file",
199199
cfg: {} as never,
200200
providerConfig: {
201201
apiKey: "xi-test",

src/agents/skills.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
setRuntimeConfigSnapshot,
77
} from "../config/runtime-snapshot.js";
88
import type { OpenClawConfig } from "../config/types.openclaw.js";
9+
import { clearPluginMetadataLifecycleCaches } from "../plugins/plugin-metadata-lifecycle.js";
910
import { captureEnv, withPathResolutionEnv } from "../test-utils/env.js";
1011
import { createFixtureSuite } from "../test-utils/fixture-suite.js";
1112
import { createTempHomeEnv, type TempHomeEnv } from "../test-utils/temp-home.js";
@@ -171,6 +172,7 @@ afterAll(async () => {
171172

172173
afterEach(() => {
173174
clearRuntimeConfigSnapshot();
175+
clearPluginMetadataLifecycleCaches();
174176
});
175177

176178
describe("buildWorkspaceSkillCommandSpecs", () => {
@@ -286,8 +288,8 @@ describe("buildWorkspaceSkillCommandSpecs", () => {
286288
},
287289
} satisfies OpenClawConfig;
288290

289-
// Prime plugin discovery before the bundle exists so command loading proves
290-
// it sees the current filesystem state instead of a stale cached snapshot.
291+
// Prime plugin discovery before the bundle exists; clear the lifecycle cache
292+
// below to model the install/reload boundary that exposes new plugin files.
291293
buildWorkspaceSkillCommandSpecs(workspaceDir, {
292294
...resolveTestSkillDirs(workspaceDir),
293295
config,
@@ -313,6 +315,7 @@ describe("buildWorkspaceSkillCommandSpecs", () => {
313315
].join("\n"),
314316
"utf-8",
315317
);
318+
clearPluginMetadataLifecycleCaches();
316319

317320
const commands = buildWorkspaceSkillCommandSpecs(workspaceDir, {
318321
...resolveTestSkillDirs(workspaceDir),

src/commands/channel-setup/plugin-install.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,8 @@ describe("ensureChannelSetupPluginInstalled", () => {
10031003
onlyPluginIds: ["custom-external-chat-plugin"],
10041004
});
10051005
const manifestCall = loadPluginManifestRegistry.mock.calls
1006-
.map((call) => requireRecord(call[0], "manifest registry args"))
1006+
.map((call) => call[0])
1007+
.filter(isRecord)
10071008
.find((args) =>
10081009
requireArray(args.candidates, "manifest candidates").some((candidate) => {
10091010
const record = requireRecord(candidate, "manifest candidate");

src/plugins/plugin-registry.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ function createIndex(
154154

155155
function createPersistableIndex(pluginId: string): InstalledPluginIndex {
156156
const index = createIndex(pluginId);
157-
return {
158-
...index,
159-
plugins: index.plugins.map((plugin) => ({ ...plugin, enabled: false })),
160-
};
157+
for (const plugin of index.plugins) {
158+
plugin.enabled = false;
159+
}
160+
return index;
161161
}
162162

163163
function requireRecord(value: unknown, label: string): Record<string, unknown> {

0 commit comments

Comments
 (0)