16 lines
394 B
TypeScript
16 lines
394 B
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { Fico } from "../src/Fico.js";
|
|
|
|
const fico = new Fico();
|
|
|
|
describe("Fico roundtrip", () => {
|
|
it("encode → PNG → decode should preserve data", () => {
|
|
const input = new TextEncoder().encode("Hello FICO 🚀");
|
|
|
|
const png = fico.toPNG(input);
|
|
const output = fico.fromPNG(png);
|
|
|
|
expect(output).toEqual(input);
|
|
});
|
|
});
|