assert.response error inside another response call
Closed this issue · 4 comments
zdwalter commented
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.<anonymous> (/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)
kkaefer commented
It looks like starting the app
server fails.
zdwalter commented
the app.js is generated by express, which is an empty app.
and it worked with node v0.4.12
zdwalter commented
ya, duplicate issue.
I will try to find some work around without nested call.