mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 22:31:35 +00:00

Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
19 lines
451 B
JavaScript
19 lines
451 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const http = require('http');
|
|
|
|
const server = http.Server(function(req, res) {
|
|
res.writeHead(200, {'Content-Type': 'text/plain'});
|
|
res.end('hello world\n');
|
|
});
|
|
server.listen(0, function() {
|
|
const req = http.get({port: this.address().port}, function(res) {
|
|
res.on('end', function() {
|
|
assert.ok(!req.end());
|
|
server.close();
|
|
});
|
|
res.resume();
|
|
});
|
|
});
|