Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/lang/bun/files/patch-test_js_web_console_console-log-utf16.test.ts
46591 views
1
-- Replace toBeEmpty() with toBe("") to avoid matcher pollution from test 16312.
2
-- Test 16312 calls expect.extend(@testing-library/jest-dom/matchers) globally,
3
-- which overrides bun's built-in toBeEmpty() with a DOM-only version that rejects
4
-- strings. When tests run in the same process (bun test --jobs 1), subsequent
5
-- tests calling toBeEmpty() on string values fail with "value must be an
6
-- HTMLElement or an SVGElement". Using toBe("") is the correct, unambiguous way
7
-- to assert an empty string.
8
--- test/js/web/console/console-log-utf16.test.ts.orig 2026-04-27 17:38:48 UTC
9
+++ test/js/web/console/console-log-utf16.test.ts
10
@@ -13,7 +13,7 @@ it("works with large utf-16 strings", async () => {
11
const exitCode = await proc.exited;
12
const stdout = await proc.stdout.text();
13
const stderr = await proc.stderr.text();
14
- expect(stderr).toBeEmpty();
15
+ expect(stderr).toBe("");
16
expect(exitCode).toBe(0);
17
18
const expected = Array(10000).fill("肉醬意大利粉").join("\n");
19
20