mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 11:10:44 +00:00
test: avoid cli count filter allocations
This commit is contained in:
@@ -397,7 +397,9 @@ describe("registerPluginCliCommands", () => {
|
||||
primary: "memory",
|
||||
});
|
||||
|
||||
expect(program.commands.filter((command) => command.name() === "memory")).toHaveLength(1);
|
||||
expect(
|
||||
program.commands.reduce((count, command) => count + (command.name() === "memory" ? 1 : 0), 0),
|
||||
).toBe(1);
|
||||
expect(mocks.loadOpenClawPlugins).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
onlyPluginIds: ["memory-core"],
|
||||
|
||||
Reference in New Issue
Block a user