RpcTest
In-memory test harness for RPC groups.
RpcTest connects a generated client directly to RpcServer handlers for the same RpcGroup. It uses the no-serialization path, so requests, responses, stream chunks, acknowledgements, interrupts, headers, and middleware metadata travel through the normal client/server machinery without opening HTTP, socket, worker, or serializer infrastructure.
Constructors
makeClient
Added in v4.0.0
Source
Signature
declare const makeClient: <Rpcs extends Rpc.Any, Flatten extends boolean = false>(
group: RpcGroup.RpcGroup<Rpcs>,
options?: {
readonly flatten?: Flatten;
},
) => Effect.Effect<
Flatten extends true ? RpcClient.RpcClient.Flat<Rpcs> : RpcClient.RpcClient<Rpcs>,
never,
Scope.Scope | Rpc.ToHandler<Rpcs> | Rpc.Middleware<Rpcs> | Rpc.MiddlewareClient<Rpcs>
>;
Creates an in-memory RPC client for a group, backed by the group's handlers from the environment and using the no-serialization test transport.