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' });