-
-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
57 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+218 KB
...apshots__/index-test-ts-src-index-test-ts-has-alpha-image-with-alpha-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
import { expect, test } from "vitest"; | ||
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"; | ||
|
||
test("adds 1 + 2 to equal 3", () => { | ||
expect(1 + 2).toBe(3); | ||
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(); | ||
Check failure on line 15 in plugins/plugin-blur/src/index.test.ts GitHub Actions / test-browsersrc/index.test.ts > hasAlpha > image with alpha
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.