-
-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a425b4c
commit ce93e64
Showing
5 changed files
with
39 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,16 @@ | |
"author": "Andrew Lisowski <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@jimp/types": "workspace:*" | ||
"@jimp/core": "workspace:*", | ||
"@jimp/utils": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@jimp/config-eslint": "workspace:*", | ||
"@jimp/config-typescript": "workspace:*", | ||
"@jimp/config-vitest": "workspace:*", | ||
"@jimp/js-png": "workspace:*", | ||
"@jimp/test-utils": "workspace:*", | ||
"@jimp/types": "workspace:*", | ||
"@vitest/browser": "^1.4.0", | ||
"eslint": "^8.57.0", | ||
"tshy": "^3.0.2", | ||
|
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.