Spaces:
Sleeping
Sleeping
File size: 578 Bytes
3530df7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import { describe, expect, test } from "vitest";
import { createJimp } from "@jimp/core";
import { getTestImagePath } from "@jimp/test-utils";
import "@jimp/test-utils/image-snapshot";
import png from "@jimp/js-png";
import * as blur from "./index.js";
const Jimp = createJimp({ formats: [png], plugins: [blur.methods] });
describe("hasAlpha", () => {
test("image with alpha", async () => {
const image = await Jimp.read(getTestImagePath("dice.png"));
const output = await image.blur(16).getBuffer("image/png");
expect(output).toMatchImageSnapshot();
});
});
|