UNPKG

unmock-core

Version:

[![npm](https://img.shields.io/npm/v/unmock-core.svg)][npmjs] [![CircleCI](https://circleci.com/gh/unmock/unmock-js.svg?style=svg)](https://circleci.com/gh/unmock/unmock-js) [![codecov](https://codecov.io/gh/unmock/unmock-js/branch/dev/graph/badge.svg)](h

36 lines 2.11 kB
import { SinonMatcher } from "sinon"; import { ServiceSpy } from ".."; import { HTTPMethod } from "../../../interfaces"; export interface ISpyDecoration { with(matcher: SinonMatcher): ServiceSpy; withMethod(method: HTTPMethod): ServiceSpy; postRequestHost(matcher?: SinonMatcher): string; postRequestBody(matcher?: SinonMatcher): any; postResponseBody(matcher?: SinonMatcher): any; getRequestHost(matcher?: SinonMatcher): string; getRequestBody(matcher?: SinonMatcher): any; getResponseBody(matcher?: SinonMatcher): any; putRequestHost(matcher?: SinonMatcher): string; putRequestBody(matcher?: SinonMatcher): any; putResponseBody(matcher?: SinonMatcher): any; deleteRequestHost(matcher?: SinonMatcher): string; deleteRequestBody(matcher?: SinonMatcher): any; deleteResponseBody(matcher?: SinonMatcher): any; } export declare const decorators: { with(this: ServiceSpy, matcher: SinonMatcher): ServiceSpy; withMethod(this: ServiceSpy, method: "head" | "get" | "post" | "put" | "patch" | "delete" | "options" | "trace"): ServiceSpy; postRequestHost(this: ServiceSpy, matcher?: SinonMatcher | undefined): string; postRequestBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; postResponseBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; getRequestHost(this: ServiceSpy, matcher?: SinonMatcher | undefined): string; getRequestBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; getResponseBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; putRequestHost(this: ServiceSpy, matcher?: SinonMatcher | undefined): string; putRequestBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; putResponseBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; deleteRequestHost(this: ServiceSpy, matcher?: SinonMatcher | undefined): string; deleteRequestBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; deleteResponseBody(this: ServiceSpy, matcher?: SinonMatcher | undefined): any; }; //# sourceMappingURL=index.d.ts.map