mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added support for query (docs: https://github.com/pgte/nock#specifying-request-query-string)
This commit is contained in:
@@ -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);
|
||||
|
||||
Vendored
+4
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user