Files
fico/tests/read.test.ts
T
2026-07-01 08:15:20 +02:00

19 lines
432 B
TypeScript

import { describe, it, expect } from "vitest";
import { Fico } from "../src/Fico.js";
describe("read png", () => {
it("should read PNG and recover original data", () => {
const fico = new Fico();
const input = new TextEncoder().encode("Hello FICO 🚀");
// encode → PNG
const png = fico.toPNG(input);
// PNG → decode
const output = fico.fromPNG(png);
expect(output).toEqual(input);
});
});