From 141eaef7d35612d8aaabd494bd2c5fdc8ff870b5 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Mon, 16 Jan 2012 09:49:45 -0800 Subject: [PATCH] Failing test. --- test/parser.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parser.js b/test/parser.js index f98bc1bb..e4f857f2 100644 --- a/test/parser.js +++ b/test/parser.js @@ -62,6 +62,11 @@ describe('parser', function () { .to.eql({ type: 'message', data: 'aaa' }); }); + it('should encode a message packet coercing to string', function () { + expect(decode(encode({ type: 'message', data: 1 }))) + .to.eql({ type: 'message', data: '1' }); + }); + it('should encode an upgrade packet', function () { expect(decode(encode({ type: 'upgrade' }))) .to.eql({ type: 'upgrade' });