UNPKG

@cloudnc/grpc-web-testing-toolbox

Version:

Utility functions to help you stub and assert on grpc calls.

5 lines (4 loc) 412 B
import { Page } from '@playwright/test'; import { GrpcResponse } from '../base'; import { MockedGrpcCall, UnaryMethodDefinitionish } from './interfaces'; export declare function mockGrpcUnary(page: Page, rpc: UnaryMethodDefinitionish, response: GrpcResponse | Promise<GrpcResponse> | ((request: Uint8Array | null) => GrpcResponse | Promise<GrpcResponse>), mockAtContextLevel?: boolean): Promise<MockedGrpcCall>;