From 3758f4b67512a6357c4223f3ea6c4bc79260e981 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sun, 1 Sep 2013 15:07:54 -0700 Subject: [PATCH] use app.listen() in tests --- test/application.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/application.js b/test/application.js index b93a0f5..364fe46 100644 --- a/test/application.js +++ b/test/application.js @@ -34,7 +34,7 @@ describe('app.use(fn)', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -57,7 +57,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .head('/') @@ -75,7 +75,7 @@ describe('app.respond', function(){ it('should 404', function(done){ var app = koa(); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -94,7 +94,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -113,7 +113,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -131,7 +131,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -150,7 +150,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -174,7 +174,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -194,7 +194,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -233,7 +233,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -263,7 +263,7 @@ describe('app.respond', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -290,7 +290,7 @@ describe('app.context(obj)', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -320,7 +320,7 @@ describe('app.context(obj)', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/') @@ -347,7 +347,7 @@ describe('app.context(obj)', function(){ } }); - var server = http.createServer(app.callback()); + var server = app.listen(); request(server) .get('/')