@types/nock Multiple set cookie. (#22921)

This commit is contained in:
Garanzha Dmitriy
2018-01-17 19:49:13 +02:00
committed by Wesley Wigham
parent ce95a260e0
commit 1df22278c5
2 changed files with 8 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
// Horiuchi_H <https://github.com/horiuchi>
// afharo <https://github.com/afharo>
// Matt R. Wilson <https://github.com/mastermatt>
// Garanzha Dmitriy <https://github.com/damour>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
@@ -34,7 +35,7 @@ declare namespace nock {
export var back: NockBack;
type HttpHeaders = { [key: string]: string | { (req: any, res: any, body: string): any; }; };
type HttpHeaders = { [key: string]: string | string[] | { (req: any, res: any, body: string): any; }; };
type InterceptFunction = (
uri: string | RegExp | { (uri: string): boolean; },
requestBody?: string | RegExp | { (body: any): boolean; } | any,

View File

@@ -368,6 +368,12 @@ var scope = nock('http://www.headdy.com')
'X-My-Headers': 'My Header value'
});
var scope = nock('http://www.headdy.com')
.get('/')
.reply(200, 'Hello World!', {
'X-My-Headers': ['My Header value 1', 'My Header value 2']
});
var scope = nock('http://www.headdy.com')
.get('/')
.reply(200, 'Hello World!', {