feat: publish Regex Tools 0.1.0

This commit is contained in:
2026-07-24 18:04:21 +02:00
commit 873b9b218d
136 changed files with 24212 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { describe, expect, it } from "vitest";
import { utf8ByteLength } from "./request-limits";
describe("UTF-8 resource accounting", () => {
it("matches TextEncoder for ASCII, astral characters and lone surrogates", () => {
for (const value of ["", "ASCII", "Bérénice", "😀", "\ud800", "\udc00"]) {
expect(utf8ByteLength(value)).toBe(
new TextEncoder().encode(value).byteLength,
);
}
});
});