Path: blob/main/lang/bun/files/patch-test_js_web_console_console-log-utf16.test.ts
46591 views
-- Replace toBeEmpty() with toBe("") to avoid matcher pollution from test 16312.1-- Test 16312 calls expect.extend(@testing-library/jest-dom/matchers) globally,2-- which overrides bun's built-in toBeEmpty() with a DOM-only version that rejects3-- strings. When tests run in the same process (bun test --jobs 1), subsequent4-- tests calling toBeEmpty() on string values fail with "value must be an5-- HTMLElement or an SVGElement". Using toBe("") is the correct, unambiguous way6-- to assert an empty string.7--- test/js/web/console/console-log-utf16.test.ts.orig 2026-04-27 17:38:48 UTC8+++ test/js/web/console/console-log-utf16.test.ts9@@ -13,7 +13,7 @@ it("works with large utf-16 strings", async () => {10const exitCode = await proc.exited;11const stdout = await proc.stdout.text();12const stderr = await proc.stderr.text();13- expect(stderr).toBeEmpty();14+ expect(stderr).toBe("");15expect(exitCode).toBe(0);1617const expected = Array(10000).fill("肉醬意大利粉").join("\n");181920