Fix some webp images improperly marked as animated (#29713)
* Fix some webp images improperly marked as animated * Add unit test for an unanimated webp file in extended file format * Apply linting to webp test
This commit is contained in:
@@ -51,6 +51,13 @@ describe("Image", () => {
|
||||
expect(await blobIsAnimated("image/webp", img)).toBeFalsy();
|
||||
});
|
||||
|
||||
it("Static WEBP in extended file format", async () => {
|
||||
const img = new Blob([
|
||||
fs.readFileSync(path.resolve(__dirname, "images", "static-logo-extended-file-format.webp")),
|
||||
]);
|
||||
expect(await blobIsAnimated("image/webp", img)).toBeFalsy();
|
||||
});
|
||||
|
||||
it("Animated PNG", async () => {
|
||||
const img = new Blob([fs.readFileSync(path.resolve(__dirname, "images", "animated-logo.apng"))]);
|
||||
expect(await blobIsAnimated("image/png", img)).toBeTruthy();
|
||||
|
||||
BIN
test/unit-tests/images/static-logo-extended-file-format.webp
Normal file
BIN
test/unit-tests/images/static-logo-extended-file-format.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 734 B |
Reference in New Issue
Block a user