diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-10-15 01:08:36 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-10-15 01:08:36 +0200 |
commit | 018e110cd11720997e49c9b270ecc50a04de4ece (patch) | |
tree | 7573cccca0be5399b964e015faaf94055dfeef37 /test/simple/test-http-head-response-has-no-body-end.js | |
parent | 3108a9ee3831b8b0a40a09314a005ef2430dacbc (diff) | |
download | node-new-018e110cd11720997e49c9b270ecc50a04de4ece.tar.gz |
test: replace .addListener() calls with .on()
Diffstat (limited to 'test/simple/test-http-head-response-has-no-body-end.js')
-rw-r--r-- | test/simple/test-http-head-response-has-no-body-end.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/simple/test-http-head-response-has-no-body-end.js b/test/simple/test-http-head-response-has-no-body-end.js index 1810f4a2ce..ee48f52743 100644 --- a/test/simple/test-http-head-response-has-no-body-end.js +++ b/test/simple/test-http-head-response-has-no-body-end.js @@ -39,14 +39,14 @@ server.listen(common.PORT); var responseComplete = false; -server.addListener('listening', function() { +server.on('listening', function() { var req = http.request({ port: common.PORT, method: 'HEAD', path: '/' }, function(res) { common.error('response'); - res.addListener('end', function() { + res.on('end', function() { common.error('response end'); server.close(); responseComplete = true; @@ -56,6 +56,6 @@ server.addListener('listening', function() { req.end(); }); -process.addListener('exit', function() { +process.on('exit', function() { assert.ok(responseComplete); }); |