diff --git a/nock/nock-tests.ts b/nock/nock-tests.ts index 00227dfaf..bc936a05b 100644 --- a/nock/nock-tests.ts +++ b/nock/nock-tests.ts @@ -45,6 +45,9 @@ inst = inst.merge(str, data); inst = inst.merge(str, obj); inst = inst.merge(str, regex); +inst = inst.query(obj); +inst = inst.query(bool); + inst = inst.intercept(str, str); inst = inst.intercept(str, str, str); inst = inst.intercept(str, str, obj); diff --git a/nock/nock.d.ts b/nock/nock.d.ts index b6803ca89..3cd92e65a 100644 --- a/nock/nock.d.ts +++ b/nock/nock.d.ts @@ -45,6 +45,9 @@ declare module "nock" { merge(path: string, data?: Object): Scope; merge(path: string, regex?: RegExp): Scope; + query(params: any): Scope; + query(acceptAnyParams: boolean): Scope; + intercept(path: string, verb: string, body?: string, options?: any): Scope; intercept(path: string, verb: string, body?: Object, options?: any): Scope; intercept(path: string, verb: string, body?: RegExp, options?: any): Scope; @@ -55,7 +58,7 @@ declare module "nock" { replyWithFile(responseCode: number, fileName: string): Scope; defaultReplyHeaders(headers: Object): Scope; - + matchHeader(name: string, value: string): Scope; matchHeader(name: string, regex: RegExp): Scope; matchHeader(name: string, fn: (value: string) => boolean): Scope;