mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
style(memory): format flaky ci test files
This commit is contained in:
@@ -96,8 +96,12 @@ describe("resolveMemoryBackendConfig", () => {
|
||||
} as OpenClawConfig;
|
||||
const mainResolved = resolveMemoryBackendConfig({ cfg, agentId: "main" });
|
||||
const devResolved = resolveMemoryBackendConfig({ cfg, agentId: "dev" });
|
||||
const mainNames = new Set((mainResolved.qmd?.collections ?? []).map((collection) => collection.name));
|
||||
const devNames = new Set((devResolved.qmd?.collections ?? []).map((collection) => collection.name));
|
||||
const mainNames = new Set(
|
||||
(mainResolved.qmd?.collections ?? []).map((collection) => collection.name),
|
||||
);
|
||||
const devNames = new Set(
|
||||
(devResolved.qmd?.collections ?? []).map((collection) => collection.name),
|
||||
);
|
||||
expect(mainNames.has("memory-dir-main")).toBe(true);
|
||||
expect(devNames.has("memory-dir-dev")).toBe(true);
|
||||
expect(mainNames.has("workspace-main")).toBe(true);
|
||||
|
||||
@@ -321,7 +321,9 @@ describe("QmdMemoryManager", () => {
|
||||
emitAndClose(
|
||||
child,
|
||||
"stdout",
|
||||
JSON.stringify([{ name: sessionCollectionName, path: wrongSessionsPath, mask: "**/*.md" }]),
|
||||
JSON.stringify([
|
||||
{ name: sessionCollectionName, path: wrongSessionsPath, mask: "**/*.md" },
|
||||
]),
|
||||
);
|
||||
return child;
|
||||
}
|
||||
@@ -340,7 +342,8 @@ describe("QmdMemoryManager", () => {
|
||||
|
||||
const commands = spawnMock.mock.calls.map((call) => call[1] as string[]);
|
||||
const removeSessions = commands.find(
|
||||
(args) => args[0] === "collection" && args[1] === "remove" && args[2] === sessionCollectionName,
|
||||
(args) =>
|
||||
args[0] === "collection" && args[1] === "remove" && args[2] === sessionCollectionName,
|
||||
);
|
||||
expect(removeSessions).toBeDefined();
|
||||
|
||||
@@ -373,7 +376,11 @@ describe("QmdMemoryManager", () => {
|
||||
spawnMock.mockImplementation((_cmd: string, args: string[]) => {
|
||||
if (args[0] === "collection" && args[1] === "list") {
|
||||
const child = createMockChild({ autoClose: false });
|
||||
emitAndClose(child, "stdout", JSON.stringify([`workspace-${agentId}`, sessionCollectionName]));
|
||||
emitAndClose(
|
||||
child,
|
||||
"stdout",
|
||||
JSON.stringify([`workspace-${agentId}`, sessionCollectionName]),
|
||||
);
|
||||
return child;
|
||||
}
|
||||
return createMockChild();
|
||||
@@ -384,7 +391,8 @@ describe("QmdMemoryManager", () => {
|
||||
|
||||
const commands = spawnMock.mock.calls.map((call) => call[1] as string[]);
|
||||
const removeSessions = commands.find(
|
||||
(args) => args[0] === "collection" && args[1] === "remove" && args[2] === sessionCollectionName,
|
||||
(args) =>
|
||||
args[0] === "collection" && args[1] === "remove" && args[2] === sessionCollectionName,
|
||||
);
|
||||
expect(removeSessions).toBeDefined();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user