mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 18:24:47 +00:00
test: dedupe acp runtime mock read
This commit is contained in:
@@ -52,7 +52,7 @@ const ctx = {
|
||||
|
||||
function expectDispatchPayloadFields(expected: Record<string, unknown>): void {
|
||||
expect(dispatchMock).toHaveBeenCalledTimes(1);
|
||||
const [payload] = dispatchMock.mock.calls.at(0) ?? [];
|
||||
const [payload] = dispatchMock.mock.calls[0] ?? [];
|
||||
expect(payload).toBeTypeOf("object");
|
||||
for (const [key, value] of Object.entries(expected)) {
|
||||
expect((payload as Record<string, unknown>)[key]).toBe(value);
|
||||
|
||||
Reference in New Issue
Block a user