mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 09:02:02 +03:00
test(web): annotate access-control harness mocks
This commit is contained in:
@@ -1,8 +1,15 @@
|
|||||||
import { beforeEach, vi } from "vitest";
|
import { beforeEach, vi } from "vitest";
|
||||||
|
|
||||||
export const sendMessageMock = vi.fn();
|
type AsyncMock<TArgs extends unknown[] = unknown[], TResult = unknown> = {
|
||||||
export const readAllowFromStoreMock = vi.fn();
|
(...args: TArgs): Promise<TResult>;
|
||||||
export const upsertPairingRequestMock = vi.fn();
|
mockReset: () => AsyncMock<TArgs, TResult>;
|
||||||
|
mockResolvedValue: (value: TResult) => AsyncMock<TArgs, TResult>;
|
||||||
|
mockResolvedValueOnce: (value: TResult) => AsyncMock<TArgs, TResult>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const sendMessageMock = vi.fn() as AsyncMock;
|
||||||
|
export const readAllowFromStoreMock = vi.fn() as AsyncMock;
|
||||||
|
export const upsertPairingRequestMock = vi.fn() as AsyncMock;
|
||||||
|
|
||||||
let config: Record<string, unknown> = {};
|
let config: Record<string, unknown> = {};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user