From e5fd969bc4d61017f37cdd1a0ccc47f00760b868 Mon Sep 17 00:00:00 2001 From: Michael Sargent Date: Tue, 7 Feb 2017 21:00:04 -0800 Subject: [PATCH] Add field 'ca' in ServerOptions --- restify/index.d.ts | 1 + restify/restify-tests.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/restify/index.d.ts b/restify/index.d.ts index f53aa0eba9..1da7b0dab0 100644 --- a/restify/index.d.ts +++ b/restify/index.d.ts @@ -448,6 +448,7 @@ interface Server extends http.Server { } interface ServerOptions { + ca?: string; certificate?: string; key?: string; formatters?: Object; diff --git a/restify/restify-tests.ts b/restify/restify-tests.ts index dcf7dc4ca6..147171ae29 100644 --- a/restify/restify-tests.ts +++ b/restify/restify-tests.ts @@ -18,6 +18,7 @@ var server = restify.createServer({ }); server = restify.createServer({ + ca: "test", certificate: "test", key: "test", formatters: {}, @@ -43,7 +44,7 @@ function send(req: restify.Request, res: restify.Response, next: restify.Next) { req.header('key') === 'val'; req.trailer('key', 'val'); req.trailer('key') === 'val'; - + req.accepts('test') === true; req.accepts(['test']) === true; req.acceptsEncoding('test') === true; @@ -343,7 +344,7 @@ client2.get('/str/mcavage', function(err: any, req: any) { }); }); }); - + client.basicAuth('test', 'password'); client2.basicAuth('test', 'password');