Skip to content

Commit c37a91d

Browse files
committed
move changes to new test file
1 parent e3282ba commit c37a91d

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
'use strict';
22
const common = require('../common');
33
const http = require('http');
4-
const net = require('net');
54
const server = http.createServer(function(req, res) {
65
res.end();
76
});
87

98
server.listen(0, common.mustCall(function() {
109
const req = http.request({
1110
port: this.address().port
12-
}, common.mustCall());
11+
}, common.mustNotCall());
1312

1413
req.on('abort', common.mustCall(function() {
1514
server.close();
@@ -18,6 +17,4 @@ server.listen(0, common.mustCall(function() {
1817
req.end();
1918
req.abort();
2019
req.abort();
21-
22-
req.emit('response', new http.IncomingMessage(new net.Socket()));
2320
}));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
const common = require('../common');
3+
const http = require('http');
4+
const net = require('net');
5+
const server = http.createServer(function(req, res) {
6+
res.end();
7+
});
8+
9+
server.listen(0, common.mustCall(function() {
10+
const req = http.request({
11+
port: this.address().port
12+
}, common.mustCall());
13+
14+
req.on('abort', common.mustCall(function() {
15+
server.close();
16+
}));
17+
18+
req.end();
19+
req.abort();
20+
req.abort();
21+
22+
req.emit('response', new http.IncomingMessage(new net.Socket()));
23+
}));

0 commit comments

Comments
 (0)