diff --git a/package.json b/package.json index e4c812b..313396e 100644 --- a/package.json +++ b/package.json @@ -59,11 +59,11 @@ "url-parse-lax": "^1.0.0" }, "devDependencies": { - "ava": "^0.12.0", + "ava": "^0.13.0", "coveralls": "^2.11.4", "get-port": "^2.0.0", "into-stream": "^2.0.0", - "nyc": "^5.0.1", + "nyc": "^6.0.0", "pem": "^1.4.4", "pify": "^2.3.0", "tempfile": "^1.1.1", diff --git a/test/https.js b/test/https.js index a603eac..01945b5 100644 --- a/test/https.js +++ b/test/https.js @@ -5,9 +5,6 @@ import got from '../'; import {createSSLServer} from './helpers/server'; let s; -let key; -let cert; -let caRootKey; let caRootCert; const pemP = pify(pem, Promise); @@ -15,7 +12,7 @@ const pemP = pify(pem, Promise); test.before('setup', async () => { const caKeys = await pemP.createCertificate({days: 1, selfSigned: true}); - caRootKey = caKeys.serviceKey; + const caRootKey = caKeys.serviceKey; caRootCert = caKeys.certificate; const keys = await pemP.createCertificate({ @@ -31,8 +28,8 @@ test.before('setup', async () => { commonName: 'sindresorhus.com' }); - key = keys.clientKey; - cert = keys.certificate; + const key = keys.clientKey; + const cert = keys.certificate; s = await createSSLServer({key, cert}); diff --git a/test/redirects.js b/test/redirects.js index dba2d91..ceceb27 100644 --- a/test/redirects.js +++ b/test/redirects.js @@ -6,18 +6,14 @@ import {createServer, createSSLServer} from './helpers/server'; let http; let https; -let key; -let cert; -let caRootKey; -let caRootCert; const pemP = pify(pem, Promise); test.before('setup', async () => { const caKeys = await pemP.createCertificate({days: 1, selfSigned: true}); - caRootKey = caKeys.serviceKey; - caRootCert = caKeys.certificate; + const caRootKey = caKeys.serviceKey; + const caRootCert = caKeys.certificate; const keys = await pemP.createCertificate({ serviceCertificate: caRootCert, @@ -32,8 +28,8 @@ test.before('setup', async () => { commonName: 'sindresorhus.com' }); - key = keys.clientKey; - cert = keys.certificate; + const key = keys.clientKey; + const cert = keys.certificate; https = await createSSLServer({key, cert});