chore(icon_pack): map woff attachment

This commit is contained in:
Elian Doran 2025-12-26 17:30:19 +02:00
parent 5ad7323d03
commit d121de5152
No known key found for this signature in database
2 changed files with 17 additions and 1 deletions

View File

@ -45,4 +45,19 @@ describe("Mapping attachments", () => {
const attachment = determineBestFontAttachment(iconPackNote);
expect(attachment?.mime).toStrictEqual("font/woff2");
});
it("handles woff", () => {
const iconPackNote = buildNote({
type: "text",
attachments: [
{
role: "file",
title: "Font",
mime: "font/woff"
}
]
});
const attachment = determineBestFontAttachment(iconPackNote);
expect(attachment?.mime).toStrictEqual("font/woff");
});
});

View File

@ -3,7 +3,8 @@ import type BNote from "../becca/entities/bnote";
import log from "./log";
const PREFERRED_MIME_TYPE = [
"font/woff2"
"font/woff2",
"font/woff"
];
export interface IconPackManifest {