| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 00f0864 commit bcbf50d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,16 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - var common = require('../common'); | ||
| 3 | - var assert = require('assert'); | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const assert = require('assert'); | ||
| 4 | 4 | ||
| 5 | - var http = require('http'); | ||
| 5 | + const http = require('http'); | ||
| 6 | 6 | ||
| 7 | 7 | if (common.hasCrypto) { | |
| 8 | 8 | var https = require('https'); | |
| 9 | 9 | } else { | |
| 10 | 10 | common.skip('missing crypto'); | |
| 11 | 11 | } | |
| 12 | 12 | ||
| 13 | - var host = '*'.repeat(256); | ||
| 13 | + const host = '*'.repeat(256); | ||
| 14 | 14 | ||
| 15 | 15 | function do_not_call() { | |
| 16 | 16 | throw new Error('This function should not have been called.'); | |
@@ -20,15 +20,15 @@ function test(mod) { | |||
| 20 | 20 | ||
| 21 | 21 | // Bad host name should not throw an uncatchable exception. | |
| 22 | 22 | // Ensure that there is time to attach an error listener. | |
| 23 | - var req1 = mod.get({host: host, port: 42}, do_not_call); | ||
| 23 | + const req1 = mod.get({host: host, port: 42}, do_not_call); | ||
| 24 | 24 | req1.on('error', common.mustCall(function(err) { | |
| 25 | - assert.equal(err.code, 'ENOTFOUND'); | ||
| 25 | + assert.strictEqual(err.code, 'ENOTFOUND'); | ||
| 26 | 26 | })); | |
| 27 | 27 | // http.get() called req1.end() for us | |
| 28 | 28 | ||
| 29 | - var req2 = mod.request({method: 'GET', host: host, port: 42}, do_not_call); | ||
| 29 | + const req2 = mod.request({method: 'GET', host: host, port: 42}, do_not_call); | ||
| 30 | 30 | req2.on('error', common.mustCall(function(err) { | |
| 31 | - assert.equal(err.code, 'ENOTFOUND'); | ||
| 31 | + assert.strictEqual(err.code, 'ENOTFOUND'); | ||
| 32 | 32 | })); | |
| 33 | 33 | req2.end(); | |
| 34 | 34 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments