Skip to content

Commit e3d5518

Browse files
committed
test(agents): cover Codex preflight plugin load
1 parent 46f27b6 commit e3d5518

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/commands/agent.test.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,14 @@ describe("agentCommand", () => {
381381
runtime,
382382
);
383383

384-
expect(pluginRegistryMocks.ensurePluginRegistryLoaded).toHaveBeenCalledOnce();
385-
const registryLoad = pluginRegistryMocks.ensurePluginRegistryLoaded.mock.calls[0]?.[0];
386-
expect(registryLoad?.scope).toBe("all");
387-
expect(registryLoad?.config).toBeTypeOf("object");
388-
expect(registryLoad?.activationSourceConfig).toBeTypeOf("object");
389-
expect(registryLoad?.workspaceDir).toBe(path.join(home, "openclaw"));
390-
expect(registryLoad?.onlyPluginIds).toEqual(["codex"]);
384+
expect(pluginRegistryMocks.ensurePluginRegistryLoaded).toHaveBeenCalledTimes(2);
385+
for (const [registryLoad] of pluginRegistryMocks.ensurePluginRegistryLoaded.mock.calls) {
386+
expect(registryLoad?.scope).toBe("all");
387+
expect(registryLoad?.config).toBeTypeOf("object");
388+
expect(registryLoad?.activationSourceConfig).toBeTypeOf("object");
389+
expect(registryLoad?.workspaceDir).toBe(path.join(home, "openclaw"));
390+
expect(registryLoad?.onlyPluginIds).toEqual(["codex"]);
391+
}
391392
expectLastRunProviderModel("openai", "gpt-5.2");
392393
});
393394
});

0 commit comments

Comments
 (0)