import { describe, expect, it } from "vitest"; import {
resolveLivePluginConfigObject,
resolvePluginConfigObject,
type OpenClawConfig,
} from "./config-runtime.js";
describe("resolvePluginConfigObject", () => {
it("returns the plugin config object for a configured plugin entry", () => { const config = {
plugins: {
entries: { "demo-plugin": {
enabled: true,
config: {
enabled: false,
mode: "strict",
},
},
},
},
} as unknown as OpenClawConfig;
describe("resolveLivePluginConfigObject", () => {
it("falls back to startup config only when no runtime loader exists", () => {
expect(
resolveLivePluginConfigObject(undefined, "demo-plugin", {
enabled: true,
}),
).toEqual({
enabled: true,
});
});
it("fails closed when the runtime loader exists but the plugin entry is missing", () => { const config = {
plugins: {
entries: {},
},
} as unknown as OpenClawConfig;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.