test: verify diagnostics and session callbacks

This commit is contained in:
Shakker
2026-05-11 17:20:45 +01:00
parent 1f43e79a58
commit ac478b2c6a
5 changed files with 14 additions and 9 deletions

View File

@@ -626,9 +626,7 @@ describe("discoverOpenClawPlugins", () => {
discoverOpenClawPlugins({ env: buildDiscoveryEnv(stateDir) }),
);
expect(result.diagnostics.map((entry) => entry.message)).not.toContainEqual(
expect.stringContaining("pnpm install"),
);
expect(result.diagnostics.some((entry) => entry.message.includes("pnpm install"))).toBe(false);
});
it("does not treat repo-level live or test files as plugin entrypoints", () => {

View File

@@ -78,9 +78,7 @@ describe("hook correlation fields", () => {
await expect(run).resolves.toBeUndefined();
expect(logger.error).toHaveBeenCalledWith(
expect.stringContaining(
"[hooks] agent_end handler from plugin-a failed: timed out after 5ms",
),
"[hooks] agent_end handler from plugin-a failed: timed out after 5ms",
);
} finally {
vi.useRealTimers();