summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRobert Nagy <ronagy@icloud.com>2019-07-16 01:06:01 +0200
committerRich Trott <rtrott@gmail.com>2019-09-22 18:08:20 -0700
commite573c39b889db13a1c3da14a5116a7615653cf6c (patch)
treedc1e5af455528e4c0456162bb0d224cbb158419e /test
parent1665a9330c0fa9f4a79c900e6250938ac8d7a9e5 (diff)
downloadnode-new-e573c39b889db13a1c3da14a5116a7615653cf6c.tar.gz
http: don't emit 'data' after 'error'
PR-URL: https://github.com/nodejs/node/pull/28711 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-http-client-read-in-error.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-http-client-read-in-error.js b/test/parallel/test-http-client-read-in-error.js
index 73b86b0d7e..5e38e49c1f 100644
--- a/test/parallel/test-http-client-read-in-error.js
+++ b/test/parallel/test-http-client-read-in-error.js
@@ -1,5 +1,5 @@
'use strict';
-require('../common');
+const common = require('../common');
const net = require('net');
const http = require('http');
@@ -37,4 +37,5 @@ http.request({
agent
}).once('error', function() {
console.log('ignore');
+ this.on('data', common.mustNotCall());
});