summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-client-finished.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-http-client-finished.js')
-rw-r--r--test/parallel/test-http-client-finished.js106
1 files changed, 0 insertions, 106 deletions
diff --git a/test/parallel/test-http-client-finished.js b/test/parallel/test-http-client-finished.js
index 337f7b596d..2d7e5b95b3 100644
--- a/test/parallel/test-http-client-finished.js
+++ b/test/parallel/test-http-client-finished.js
@@ -25,109 +25,3 @@ const { finished } = require('stream');
.end();
}));
}
-
-{
- // Test abort before finished.
-
- const server = http.createServer(function(req, res) {
- });
-
- server.listen(0, common.mustCall(function() {
- const req = http.request({
- port: this.address().port
- }, common.mustNotCall());
- req.abort();
- finished(req, common.mustCall(() => {
- server.close();
- }));
- }));
-}
-
-{
- // Test abort after request.
-
- const server = http.createServer(function(req, res) {
- });
-
- server.listen(0, common.mustCall(function() {
- const req = http.request({
- port: this.address().port
- }).end();
- finished(req, (err) => {
- common.expectsError({
- type: Error,
- code: 'ERR_STREAM_PREMATURE_CLOSE'
- })(err);
- finished(req, common.mustCall(() => {
- server.close();
- }));
- });
- req.abort();
- }));
-}
-
-{
- // Test abort before end.
-
- const server = http.createServer(function(req, res) {
- res.write('test');
- });
-
- server.listen(0, common.mustCall(function() {
- const req = http.request({
- port: this.address().port
- }).on('response', common.mustCall((res) => {
- req.abort();
- finished(res, common.mustCall(() => {
- finished(res, common.mustCall(() => {
- server.close();
- }));
- }));
- })).end();
- }));
-}
-
-{
- // Test destroy before end.
-
- const server = http.createServer(function(req, res) {
- res.write('test');
- });
-
- server.listen(0, common.mustCall(function() {
- http.request({
- port: this.address().port
- }).on('response', common.mustCall((res) => {
- // TODO(ronag): Bug? Won't emit 'close' unless read.
- res.on('data', () => {});
- res.destroy();
- finished(res, common.mustCall(() => {
- finished(res, common.mustCall(() => {
- server.close();
- }));
- }));
- })).end();
- }));
-}
-
-{
- // Test finish after end.
-
- const server = http.createServer(function(req, res) {
- res.end('asd');
- });
-
- server.listen(0, common.mustCall(function() {
- http.request({
- port: this.address().port
- }).on('response', common.mustCall((res) => {
- // TODO(ronag): Bug? Won't emit 'close' unless read.
- res.on('data', () => {});
- finished(res, common.mustCall(() => {
- finished(res, common.mustCall(() => {
- server.close();
- }));
- }));
- })).end();
- }));
-}