Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
[ZoneTransfer]
ZoneId=3

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,45 @@
import { describe, expect, it } from "@suaveplan/testing/runner";
import { createFontConverter, FontConvertError } from "../src/index.js";
/**
* Integration tests that require a real font binary.
* Full real-font round-trip tests live in font-compress roundtrip.test.ts.
*/
describe("font-convert integration", () => {
it("throws FontConvertError on obviously corrupt binary", {
timeout: 5000,
}, () => {
const converter = createFontConverter();
const garbage = new Uint8Array(64).fill(0xff);
expect(() => converter.convert(garbage)).toThrow(FontConvertError);
});
it("createFontConverter returns converter with convert method", {
timeout: 5000,
}, () => {
const converter = createFontConverter();
expect(typeof converter.convert).toBe("function");
expect(typeof converter.convertFromParsed).toBe("function");
});
it("FontConvertError preserves Error cause", { timeout: 5000 }, () => {
const cause = new Error("root cause");
const err = new FontConvertError(
"FONT_CONVERT.PARSE_FAILED" as any,
"wrapped",
{ cause }
);
expect(err.cause).toBe(cause);
});
it("FontConvertError preserves context when provided", {
timeout: 5000,
}, () => {
const err = new FontConvertError(
"FONT_CONVERT.INVALID_OPTIONS" as any,
"bad options",
{ context: { field: "value" } }
);
expect(err.context).toEqual({ field: "value" });
});
});