mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 21:34:46 +00:00
test: check reply dispatch hook warnings
This commit is contained in:
@@ -80,9 +80,10 @@ describe("reply_dispatch hook runner", () => {
|
||||
queuedFinal: false,
|
||||
counts: { tool: 1, block: 0, final: 0 },
|
||||
});
|
||||
expect(logger.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("reply_dispatch handler from test-plugin failed: boom"),
|
||||
);
|
||||
expect(logger.error).toHaveBeenCalledTimes(1);
|
||||
expect(logger.error.mock.calls[0]).toEqual([
|
||||
"[hooks] reply_dispatch handler from test-plugin failed: boom",
|
||||
]);
|
||||
expect(succeeding).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
@@ -116,11 +117,10 @@ describe("reply_dispatch hook runner", () => {
|
||||
queuedFinal: false,
|
||||
counts: { tool: 1, block: 0, final: 0 },
|
||||
});
|
||||
expect(logger.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"reply_dispatch handler from test-plugin failed: timed out after 5ms",
|
||||
),
|
||||
);
|
||||
expect(logger.error).toHaveBeenCalledTimes(1);
|
||||
expect(logger.error.mock.calls[0]).toEqual([
|
||||
"[hooks] reply_dispatch handler from test-plugin failed: timed out after 5ms",
|
||||
]);
|
||||
expect(succeeding).toHaveBeenCalledTimes(1);
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
|
||||
Reference in New Issue
Block a user