aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar murgatroid99 <michael.lumish@gmail.com>2015-01-27 09:18:30 -0800
committerGravatar murgatroid99 <michael.lumish@gmail.com>2015-01-27 09:18:30 -0800
commit29c551344d0ccf041d49e0f5734c85e0be5207ae (patch)
treec1b0a765655ea3541a8a20e19ff348400409d30b /src
parent0ced264c8ca906788c0ddafeeae36a5801e00567 (diff)
Finished fixing the tests
Diffstat (limited to 'src')
-rw-r--r--src/node/test/client_server_test.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/node/test/client_server_test.js b/src/node/test/client_server_test.js
index 62283240e9..9e1b2a79c8 100644
--- a/src/node/test/client_server_test.js
+++ b/src/node/test/client_server_test.js
@@ -99,6 +99,7 @@ function stringSerialize(value) {
* @return {string} The string value of the buffer
*/
function stringDeserialize(buffer) {
+ return buffer.toString();
}
describe('echo client', function() {
@@ -130,10 +131,14 @@ describe('echo client', function() {
stream.end();
var index = 0;
stream.on('data', function(chunk) {
- assert.equal(messages[index], chunk.toString());
+ assert.equal(messages[index], chunk);
index += 1;
});
+ stream.on('status', function(status) {
+ assert.equal(status.code, client.status.OK);
+ });
stream.on('end', function() {
+ assert.equal(index, messages.length);
done();
});
});
@@ -214,11 +219,14 @@ describe('secure echo client', function() {
stream.end();
var index = 0;
stream.on('data', function(chunk) {
- assert.equal(messages[index], chunk.toString());
+ assert.equal(messages[index], chunk);
index += 1;
});
+ stream.on('status', function(status) {
+ assert.equal(status.code, client.status.OK);
+ });
stream.on('end', function() {
- server.shutdown();
+ assert.equal(index, messages.length);
done();
});
});