mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
perf(cli): finish cold read paths (#117957)
* perf(cli): finish cold read paths * test(cli): satisfy cold path lint gates * test(cli): fix cold path fixture typing
This commit is contained in:
committed by
GitHub
parent
9cf12734e6
commit
92c7400a54
@@ -561,6 +561,20 @@ describe("registerPluginCliCommands", () => {
|
||||
expect(mocks.loadConfig).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("skips unrelated plugin validation for cold plugin-owned CLI commands", async () => {
|
||||
const snapshotConfig = { plugins: { enabled: true } } as OpenClawConfig;
|
||||
mocks.readConfigFileSnapshot.mockResolvedValueOnce({
|
||||
valid: true,
|
||||
config: {},
|
||||
runtimeConfig: snapshotConfig,
|
||||
});
|
||||
|
||||
await expect(
|
||||
loadValidatedConfigForPluginRegistration({ skipPluginValidation: true }),
|
||||
).resolves.toBe(snapshotConfig);
|
||||
expect(mocks.readConfigFileSnapshot).toHaveBeenCalledWith({ skipPluginValidation: true });
|
||||
});
|
||||
|
||||
it("preserves an already-active runtime config snapshot", async () => {
|
||||
const snapshotConfig = { plugins: { enabled: true } } as OpenClawConfig;
|
||||
const activeConfig = { plugins: { enabled: false } } as OpenClawConfig;
|
||||
|
||||
Reference in New Issue
Block a user