summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-status-code.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-http-status-code.js')
-rw-r--r--test/parallel/test-http-status-code.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-http-status-code.js b/test/parallel/test-http-status-code.js
index 0b3d204c43..b5060109bf 100644
--- a/test/parallel/test-http-status-code.js
+++ b/test/parallel/test-http-status-code.js
@@ -6,12 +6,12 @@ const http = require('http');
// Simple test of Node's HTTP ServerResponse.statusCode
// ServerResponse.prototype.statusCode
-var testsComplete = 0;
-var tests = [200, 202, 300, 404, 451, 500];
-var testIdx = 0;
+let testsComplete = 0;
+const tests = [200, 202, 300, 404, 451, 500];
+let testIdx = 0;
-var s = http.createServer(function(req, res) {
- var t = tests[testIdx];
+const s = http.createServer(function(req, res) {
+ const t = tests[testIdx];
res.writeHead(t, {'Content-Type': 'text/plain'});
console.log('--\nserver: statusCode after writeHead: ' + res.statusCode);
assert.equal(res.statusCode, t);
@@ -25,7 +25,7 @@ function nextTest() {
if (testIdx + 1 === tests.length) {
return s.close();
}
- var test = tests[testIdx];
+ const test = tests[testIdx];
http.get({ port: s.address().port }, function(response) {
console.log('client: expected status: ' + test);