Files
go-jdenticon/jdenticon-js/test/unit/toPng.js
Kevin McIntyre f84b511895 init
2025-06-18 01:00:00 -04:00

18 lines
403 B
JavaScript

"use strict";
import tap from "tap";
import { toPng } from "../../src/node-esm.js";
const pngHash = toPng("Icon1", 100);
const pngValue = toPng("9faff4f3d6d7d75577ce810ec6d6a06be49c3a5a", 100);
tap.ok(pngHash);
tap.ok(pngHash instanceof Buffer);
tap.ok(pngHash.length > 500);
tap.ok(pngValue);
tap.ok(pngValue instanceof Buffer);
tap.ok(pngValue.length > 500);
tap.ok(pngHash.equals(pngValue));