aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/bun.js/text-decoder.test.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bun.js/text-decoder.test.js b/test/bun.js/text-decoder.test.js
index 4459c2dd0..417a4c23a 100644
--- a/test/bun.js/text-decoder.test.js
+++ b/test/bun.js/text-decoder.test.js
@@ -71,6 +71,14 @@ describe("TextDecoder", () => {
expect(decoded).toBe(text);
});
}
+
+ it("DOMJIT call", () => {
+ const array = new Uint8Array(bytes.buffer);
+ for (let i = 0; i < 100_000; i++) {
+ const decoded = decoder.decode(array);
+ expect(decoded).toBe(text);
+ }
+ });
});
it("should decode unicode text with multiple consecutive emoji", () => {