Skip to content

Commit

Permalink
beginning setup for v10 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Mar 12, 2013
1 parent 990a1b6 commit 699f656
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
27 changes: 16 additions & 11 deletions test/action_chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,25 @@ describe('Action: chat', function(){

var client = net.connect(specHelper.params[0].tcpServer.port, function(){
client.setEncoding('utf8');
var rsp = function(d){
var lines = d.split("\n");
var lastLine = lines[(lines.length - 1)];
if(lastLine == ""){ lastLine = lines[(lines.length - 2)]; }
var parsed = JSON.parse(lastLine);
client.removeListener('data', rsp);

parsed.error.should.equal("Error: this action does not support the socket connection type");
done();
};

var d = "";
var addData = function(data){
d += data;
}
client.on('data', addData);

setTimeout(function(){
client.on('data', rsp);
client.write("chat" + "\r\n");
setTimeout(function(){
var lines = d.split("\n");
var lastLine = lines[(lines.length - 1)];
if(lastLine == ""){ lastLine = lines[(lines.length - 2)]; }
var parsed = JSON.parse(lastLine);

client.removeListener('data', addData);
parsed.error.should.equal("Error: this action does not support the socket connection type");
done();
}, 500);
}, 1000);
});

Expand Down
1 change: 1 addition & 0 deletions versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
** General **

- removed support for node versions < v0.8.0. Time to modernize!
- added support for node v0.9 and v0.10
- actionHero now uses fakeredis rather than implamenting certain operations locally (cache, tasks)
- thanks to hdachev for all his help!
- this allows for a smaller, more unified codebase
Expand Down

0 comments on commit 699f656

Please sign in to comment.