import { describe, it } from "vitest"; import { writeFileSync } from "fs"; import { Fico } from "../src/Fico.js"; describe("generate png", () => { it("should generate a PNG file", () => { const fico = new Fico(); const input = new TextEncoder().encode("Hello FICO 🚀"); const png = fico.toPNG(input); writeFileSync("out.png", png); // juste vĂ©rifier que quelque chose est gĂ©nĂ©rĂ© if (!png || png.length === 0) { throw new Error("PNG empty"); } }); });