Skip to content

Commit 7b46bf6

Browse files
authored
Fixes trace_debugging tests. (#429)
1 parent d3929ad commit 7b46bf6

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

test/traceDebugging.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,26 @@ var proxyTarget = require('../test/support/proxyTarget');
1010
describe('trace debugging does not cause the application to fail', function () {
1111
var proxyServer;
1212

13-
beforeEach(function () { debug.enable('express-http-proxy'); proxyServer = proxyTarget(3000); });
14-
afterEach(function () { debug.disable('express-http-proxy'); proxyServer.close(); });
13+
before(function () {
14+
proxyServer = proxyTarget(8109, 1000);
15+
});
16+
17+
after(function () {
18+
proxyServer.close();
19+
});
20+
21+
beforeEach(function () {
22+
debug.enable('express-http-proxy');
23+
});
24+
25+
afterEach(function () {
26+
debug.disable('express-http-proxy');
27+
});
1528

1629
it('happy path', function (done) {
30+
debugger;
1731
var app = express();
18-
app.use(proxy('localhost:3000'));
32+
app.use(proxy('localhost:8109'));
1933
request(app)
2034
.get('/get')
2135
.expect(200)
@@ -26,7 +40,7 @@ describe('trace debugging does not cause the application to fail', function () {
2640
var app = express();
2741
var HttpAgent = require('http').Agent;
2842
var httpAgent = new HttpAgent({ keepAlive: true, keepAliveMsecs: 60e3 });
29-
app.use(proxy('localhost:3000', {
43+
app.use(proxy('localhost:8109', {
3044
proxyReqOptDecorator: function (proxyReqOpts) {
3145
proxyReqOpts.agent = httpAgent;
3246
return proxyReqOpts;

0 commit comments

Comments
 (0)