diff options
| author | Jason Humphrey <Humphrey.jason32@gmail.com> | 2016-12-01 10:22:34 -0600 |
|---|---|---|
| committer | James M Snell <jasnell@gmail.com> | 2016-12-06 13:03:39 -0800 |
| commit | a1bd070f87bfb7d32ef9ddee5c121d8eaf2f0c2b (patch) | |
| tree | da9a96421fc7b148c8687e8cb3bb271417257314 /test/parallel/test-https-timeout-server.js | |
| parent | a3a3937d7611d458f8b955db9941d29df9740abf (diff) | |
| download | node-new-a1bd070f87bfb7d32ef9ddee5c121d8eaf2f0c2b.tar.gz | |
test: use ES6 to update let & const
Also updating assertStrict and moving the assert required.
PR-URL: https://github.com/nodejs/node/pull/9917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'test/parallel/test-https-timeout-server.js')
| -rw-r--r-- | test/parallel/test-https-timeout-server.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/parallel/test-https-timeout-server.js b/test/parallel/test-https-timeout-server.js index 92b06f1495..04ccf0a64d 100644 --- a/test/parallel/test-https-timeout-server.js +++ b/test/parallel/test-https-timeout-server.js @@ -1,29 +1,29 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); +const common = require('../common'); if (!common.hasCrypto) { common.skip('missing crypto'); return; } -var https = require('https'); +const assert = require('assert'); +const https = require('https'); -var net = require('net'); -var fs = require('fs'); +const net = require('net'); +const fs = require('fs'); -var options = { +const options = { key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'), handshakeTimeout: 50 }; -var server = https.createServer(options, common.fail); +const server = https.createServer(options, common.fail); server.on('clientError', common.mustCall(function(err, conn) { // Don't hesitate to update the asserts if the internal structure of // the cleartext object ever changes. We're checking that the https.Server // has closed the client connection. - assert.equal(conn._secureEstablished, false); + assert.strictEqual(conn._secureEstablished, false); server.close(); conn.destroy(); })); |
