From 3470adfc5d7aab3aa9b93302f16a6840fefebd6a Mon Sep 17 00:00:00 2001 From: Iwo Plaza Date: Sat, 5 Oct 2024 13:59:41 +0200 Subject: [PATCH] More complex unicode tests. --- packages/typed-binary/src/test/string.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/typed-binary/src/test/string.test.ts b/packages/typed-binary/src/test/string.test.ts index 77cee25..f9f559d 100644 --- a/packages/typed-binary/src/test/string.test.ts +++ b/packages/typed-binary/src/test/string.test.ts @@ -34,4 +34,10 @@ describe('StringSchema', () => { const decoded = encodeAndDecode(string, value); expect(decoded).to.equal(value); }); + + it('should encode a unicode string', () => { + const value = 'A wonderful 🌞 sunny day! 🌲🌲🌲 Forest trip.'; + const decoded = encodeAndDecode(string, value); + expect(decoded).to.equal(value); + }); });