mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-23 11:42:36 +08:00
Merge pull request #3633 from Nemo157/nock-match-header-regex
Nock match header regex
This commit is contained in:
commit
cf7c97b2a6
2 files changed
+7
-1
No files matched your search
+4
-1
@@ -72,7 +72,10 @@ inst = inst.twice();
|
||||
inst = inst.thrice();
|
||||
|
||||
inst = inst.defaultReplyHeaders(value);
|
||||
|
||||
inst = inst.matchHeader(str, str);
|
||||
inst = inst.matchHeader(str, regex);
|
||||
inst = inst.matchHeader(str, (val: string) => true);
|
||||
|
||||
inst = inst.delay(num);
|
||||
inst = inst.delayConnection(num);
|
||||
@@ -105,4 +108,4 @@ nock.recorder.rec({
|
||||
});
|
||||
|
||||
strings = nock.recorder.play();
|
||||
objects = nock.recorder.play();
|
||||
objects = nock.recorder.play();
|
||||
Vendored
+3
@@ -55,7 +55,10 @@ 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;
|
||||
|
||||
filteringPath(regex: RegExp, replace: string): Scope;
|
||||
filteringPath(fn: (path: string) => string): Scope;
|
||||
|
||||
Reference in new issue
Block a user