11'use strict' ;
2- var common = require ( '../common' ) ;
3- var assert = require ( 'assert' ) ;
2+ const common = require ( '../common' ) ;
3+ const assert = require ( 'assert' ) ;
44
5- var http = require ( 'http' ) ;
5+ const http = require ( 'http' ) ;
66
77if ( common . hasCrypto ) {
88 var https = require ( 'https' ) ;
99} else {
1010 common . skip ( 'missing crypto' ) ;
1111}
1212
13- var host = '*' . repeat ( 256 ) ;
13+ const host = '*' . repeat ( 256 ) ;
1414
1515function do_not_call ( ) {
1616 throw new Error ( 'This function should not have been called.' ) ;
@@ -20,15 +20,15 @@ function test(mod) {
2020
2121 // Bad host name should not throw an uncatchable exception.
2222 // 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 ) ;
2424 req1 . on ( 'error' , common . mustCall ( function ( err ) {
25- assert . equal ( err . code , 'ENOTFOUND' ) ;
25+ assert . strictEqual ( err . code , 'ENOTFOUND' ) ;
2626 } ) ) ;
2727 // http.get() called req1.end() for us
2828
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 ) ;
3030 req2 . on ( 'error' , common . mustCall ( function ( err ) {
31- assert . equal ( err . code , 'ENOTFOUND' ) ;
31+ assert . strictEqual ( err . code , 'ENOTFOUND' ) ;
3232 } ) ) ;
3333 req2 . end ( ) ;
3434}
0 commit comments