From eb1dc7eede31b12726ae320263850fefaaf490f3 Mon Sep 17 00:00:00 2001 From: dave caruso Date: Mon, 18 Sep 2023 20:33:58 -0400 Subject: fix(runtime/node): Allow `new Buffer.alloc()` + Upgrade WebKit (#5699) * make bufferconstructor a static hash table * chore: Upgrade WebKit to 4d995edbc44062b251be638818edcd88d7d14dd7 * make it constructable now * fix comment * yippee * update CI workflows --- test/js/node/buffer.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/js/node/buffer.test.js') diff --git a/test/js/node/buffer.test.js b/test/js/node/buffer.test.js index afc9cdee8..0256934ce 100644 --- a/test/js/node/buffer.test.js +++ b/test/js/node/buffer.test.js @@ -2585,3 +2585,14 @@ it("construct buffer from hex, issue #4919", () => { expect(buf1).toStrictEqual(Buffer.from([])); expect(buf2).toStrictEqual(Buffer.from([0x63, 0xe9, 0xf6, 0xc4, 0xb0, 0x4f, 0xa8, 0xc8, 0x0f, 0x3f, 0xb0, 0xee])); }); + +it("new Buffer.alloc()", () => { + const buf = new Buffer.alloc(10); + expect(buf.length).toBe(10); + expect(buf[0]).toBe(0); +}); + +it("new Buffer.from()", () => { + const buf = new Buffer.from("🥶"); + expect(buf.length).toBe(4); +}); -- cgit v1.2.3