From ba8be76663f16d53e35b8e9a421a3ee9066a9da4 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 3 Apr 2019 18:04:43 +0700 Subject: [PATCH] Test raw http and https servers are exposed --- test/create-test-server.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/create-test-server.js b/test/create-test-server.js index 24ded1a..74550fc 100644 --- a/test/create-test-server.js +++ b/test/create-test-server.js @@ -242,3 +242,15 @@ test('accepts multiple callbacks in `.get()`', async t => { const { body } = await got(server.url + '/foo'); t.is(body, 'bar'); }); + +test('raw http and https servers are exposed', async t => { + const server = await createTestServer(); + + t.true(server.http.listening); + t.true(server.https.listening); + + await server.close(); + + t.false(server.http.listening); + t.false(server.https.listening); +});