From 66eae13997a812e72bc6bf9918b7b2de04b9a38a Mon Sep 17 00:00:00 2001 From: pfg Date: Thu, 7 Nov 2024 20:35:06 -0800 Subject: [PATCH] fix failing test and assertion failure --- src/bun.js/RuntimeTranspilerCache.zig | 2 +- test/js/bun/shell/bunshell.test.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bun.js/RuntimeTranspilerCache.zig b/src/bun.js/RuntimeTranspilerCache.zig index 1e514761eb567..8b7e2974cd316 100644 --- a/src/bun.js/RuntimeTranspilerCache.zig +++ b/src/bun.js/RuntimeTranspilerCache.zig @@ -637,6 +637,6 @@ pub const RuntimeTranspilerCache = struct { return; }; if (comptime bun.Environment.allow_assert) - debug("put() = {d} bytes", .{output_code.latin1().len}); + debug("put() = {d} bytes", .{output_code.length()}); } }; diff --git a/test/js/bun/shell/bunshell.test.ts b/test/js/bun/shell/bunshell.test.ts index 31b59ffa41ac9..ddca81f5b6651 100644 --- a/test/js/bun/shell/bunshell.test.ts +++ b/test/js/bun/shell/bunshell.test.ts @@ -269,10 +269,7 @@ describe("bunshell", () => { test("escape unicode", async () => { const { stdout } = await $`echo \\弟\\気`; - // TODO: Uncomment and replace after unicode in template tags is supported - // expect(stdout.toString("utf8")).toEqual(`\弟\気\n`); - // Set this here for now, because unicode in template tags while using .raw is broken, but should be fixed - expect(stdout.toString("utf8")).toEqual("\\u5F1F\\u6C17\n"); + expect(stdout.toString("utf8")).toEqual(`\\弟\\気\n`); }); /**