I use the following code in my client to check the response:
assert.strictEqual(data,{'status':'ok','message':'tweet received'});
This is the code I wrote when sending the message:
res.send({status:'ok',message:'tweet recieved'});
This is the error I got:
assert.js:92
throw new assert.AssertionError({
^
AssertionError: "{\n \"status\": \"ok\",\n \"message\": \"tweet recieved\"\n}" === {"status":"ok","message":"tweet received"}
at IncomingMessage.<anonymous> (/home/anr/Desktop/node js/mvc/ntwittertest.js:22:10)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)