mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:30:43 +00:00
fix: model plugin index records in cli tests
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
runPluginsCommand,
|
||||
runtimeErrors,
|
||||
runtimeLogs,
|
||||
setInstalledPluginIndexInstallRecords,
|
||||
updateNpmInstalledHookPacks,
|
||||
updateNpmInstalledPlugins,
|
||||
writeConfigFile,
|
||||
@@ -147,6 +148,7 @@ describe("plugins cli update", () => {
|
||||
spec: "openclaw-codex-app-server@beta",
|
||||
});
|
||||
loadConfig.mockReturnValue(config);
|
||||
setInstalledPluginIndexInstallRecords(config.plugins?.installs ?? {});
|
||||
updateNpmInstalledPlugins.mockResolvedValue({
|
||||
config,
|
||||
changed: false,
|
||||
@@ -191,6 +193,7 @@ describe("plugins cli update", () => {
|
||||
},
|
||||
} as OpenClawConfig;
|
||||
loadConfig.mockReturnValue(cfg);
|
||||
setInstalledPluginIndexInstallRecords(cfg.plugins?.installs ?? {});
|
||||
updateNpmInstalledPlugins.mockResolvedValue({
|
||||
outcomes: [{ status: "ok", message: "Updated alpha -> 1.1.0" }],
|
||||
changed: true,
|
||||
@@ -217,6 +220,7 @@ describe("plugins cli update", () => {
|
||||
expect(writeConfigFile).toHaveBeenCalledWith({});
|
||||
expect(refreshPluginRegistry).toHaveBeenCalledWith({
|
||||
config: {},
|
||||
installRecords: nextConfig.plugins?.installs,
|
||||
reason: "source-changed",
|
||||
});
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user