Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

close the server properly

  • Loading branch information...
commit abebe5aecbd0f1e38d45e618308c5f4b2e051994 1 parent db95bca
@tblobaum authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 test/pixel-tracker.js
View
10 test/pixel-tracker.js
@@ -1,10 +1,12 @@
var express = require('express')
, test = require('tap').test
, tracker = require('../')
+ , server
+ , app
test('testing pixel tracker', function (t) {
- var app = express.createServer()
+ app = express.createServer()
app.configure(function () {
app.use(express.cookieParser())
@@ -30,15 +32,15 @@ test('testing pixel tracker', function (t) {
})
app.all('/pixel', tracker.middleware)
- app.listen(3000)
+ server = app.listen(3000)
require('http').get({
host : 'localhost'
, port : 3000
, path : '/pixel'
, agent : false
- }, function (res) {
- app.close()
+ }, function () {
+ server.close()
})
})
Please sign in to comment.
Something went wrong with that request. Please try again.