feat(web): add whatsapp QR login tool

This commit is contained in:
Peter Steinberger
2025-12-20 16:51:47 +00:00
parent 5936ed7941
commit 4e491757ef
6 changed files with 417 additions and 6 deletions

11
src/web/qr-image.test.ts Normal file
View File

@@ -0,0 +1,11 @@
import { describe, expect, it } from "vitest";
import { renderQrPngBase64 } from "./qr-image.js";
describe("renderQrPngBase64", () => {
it("renders a PNG data payload", async () => {
const b64 = await renderQrPngBase64("clawdis");
const buf = Buffer.from(b64, "base64");
expect(buf.subarray(0, 8).toString("hex")).toBe("89504e470d0a1a0a");
});
});