summaryrefslogtreecommitdiff
path: root/test/pummel/test-net-pause.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-10-15 01:08:36 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2011-10-15 01:08:36 +0200
commit018e110cd11720997e49c9b270ecc50a04de4ece (patch)
tree7573cccca0be5399b964e015faaf94055dfeef37 /test/pummel/test-net-pause.js
parent3108a9ee3831b8b0a40a09314a005ef2430dacbc (diff)
downloadandroid-node-v8-018e110cd11720997e49c9b270ecc50a04de4ece.tar.gz
android-node-v8-018e110cd11720997e49c9b270ecc50a04de4ece.tar.bz2
android-node-v8-018e110cd11720997e49c9b270ecc50a04de4ece.zip
test: replace .addListener() calls with .on()
Diffstat (limited to 'test/pummel/test-net-pause.js')
-rw-r--r--test/pummel/test-net-pause.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/pummel/test-net-pause.js b/test/pummel/test-net-pause.js
index 0f5577e3cb..740869d219 100644
--- a/test/pummel/test-net-pause.js
+++ b/test/pummel/test-net-pause.js
@@ -43,7 +43,7 @@ var server = net.createServer(function(connection) {
server.on('listening', function() {
var client = net.createConnection(common.PORT);
client.setEncoding('ascii');
- client.addListener('data', function(d) {
+ client.on('data', function(d) {
common.print(d);
recv += d;
});
@@ -76,14 +76,14 @@ server.on('listening', function() {
}, 500);
- client.addListener('end', function() {
+ client.on('end', function() {
server.close();
client.end();
});
});
server.listen(common.PORT);
-process.addListener('exit', function() {
+process.on('exit', function() {
assert.equal(N, recv.length);
common.debug('Exit');
});