mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten postinstall cleanup log assertions
This commit is contained in:
@@ -626,7 +626,12 @@ describe("bundled plugin postinstall", () => {
|
||||
await expectPathExists(thirdPartyNodeModules);
|
||||
expect(log.warn).not.toHaveBeenCalled();
|
||||
expect(log.log).toHaveBeenCalledWith(
|
||||
expect.stringContaining("[postinstall] pruned legacy plugin runtime deps:"),
|
||||
`[postinstall] pruned legacy plugin runtime deps: ${[
|
||||
oldBrandLegacyRoot,
|
||||
defaultLegacyRoot,
|
||||
overrideLegacyRoot,
|
||||
systemLegacyRoot,
|
||||
].join(", ")}`,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -663,7 +668,7 @@ describe("bundled plugin postinstall", () => {
|
||||
await expectPathMissing(legacyRuntimeRoot);
|
||||
expect(log.warn).not.toHaveBeenCalled();
|
||||
expect(log.log).toHaveBeenCalledWith(
|
||||
expect.stringContaining("[postinstall] pruned legacy plugin runtime deps symlinks:"),
|
||||
`[postinstall] pruned legacy plugin runtime deps symlinks: ${slackLink}`,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -682,10 +687,14 @@ describe("bundled plugin postinstall", () => {
|
||||
}),
|
||||
).toStrictEqual([]);
|
||||
|
||||
expect(warn).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"[postinstall] could not prune legacy plugin runtime deps /home/alice/.openclaw/plugin-runtime-deps: Error: locked",
|
||||
),
|
||||
expect(warn).toHaveBeenCalledTimes(2);
|
||||
expect(warn).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
"[postinstall] could not prune legacy plugin runtime deps /home/alice/.clawdbot/plugin-runtime-deps: Error: locked",
|
||||
);
|
||||
expect(warn).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
"[postinstall] could not prune legacy plugin runtime deps /home/alice/.openclaw/plugin-runtime-deps: Error: locked",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user