visionmedia/expresso — Issue #154: assert.response error inside another response call
Author: zdwalter
Created: 2011-11-11 10:54:21+00:00
State: open

version:
localhost:test zdwalter$ node -v
v0.6.0
localhost:test zdwalter$ expresso -v
0.9.2

code:
exports['all'] = function(){
var assert = require('assert');
var app = require('app');
assert.response(app,
{ url: '/' },
{ status: 200, headers: { 'Content-Type': 'text/html; charset=utf-8' }},
function(res){

var app = require('app');
var assert = require('assert');
assert.response(app,
{ url: '/' },
{ status: 200, headers: { 'Content-Type': 'text/html; charset=utf-8' }},
function(res){
console.log('done');
});
});
};

error:
uncaught undefined: Error: connect ECONNREFUSED
at errnoException (net.js:614:11)
at Object.afterConnect [as oncomplete] (net.js:605:18)

^C
test.js all: Error: Response not completed: all.
at Function.response (/usr/local/lib/node_modules/expresso/bin/expresso:400:17)
at /Users/zdwalter/SandBox/test/test/test.js:12:24
at IncomingMessage. (/usr/local/lib/node_modules/expresso/bin/expresso:524:21)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.onMessageComplete (http.js:137:23)
at Socket.ondata (http.js:1125:24)
at TCP.onread (net.js:334:27)