From 1a20ca0bc3868a2c520fc237ef248221504b75ff Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 26 Sep 2016 18:09:50 +0200 Subject: [PATCH] Use listener for test --- test/acceptance/transaction.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/acceptance/transaction.js b/test/acceptance/transaction.js index 9655d846..8a831853 100644 --- a/test/acceptance/transaction.js +++ b/test/acceptance/transaction.js @@ -11,11 +11,12 @@ describe('transaction', function() { var server; before(function(done) { server = require('../../app/server')(); - server.listen(SERVER_PORT, '127.0.0.1', done); + this.listener = server.listen(SERVER_PORT, '127.0.0.1'); + this.listener.on('listening', done); }); after(function(done) { - server.close(done); + this.listener.close(done); }); var sqlRequest = request.defaults({