Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

beginning setup for v10 tests

  • Loading branch information...
commit 699f656ff197c2e1178afebaa76dbfd031f66eea 1 parent 990a1b6
@evantahler authored
Showing with 17 additions and 11 deletions.
  1. +16 −11 test/action_chat.js
  2. +1 −0  versions.md
View
27 test/action_chat.js
@@ -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);
});
View
1  versions.md
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.