From 91307951d349ffac5295db00feb9386be8af2593 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 15 May 2023 12:55:04 +0200 Subject: [PATCH] Fix cached JPEG test This test didn't really check anything useful as the end result would be the same if the second JPEG failed to render. Fix this by clearing the canvas between the images, so we can tell if the second image actually rendered or not. --- tests/test.jpeg.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test.jpeg.js b/tests/test.jpeg.js index 6834f03d..7580c617 100644 --- a/tests/test.jpeg.js +++ b/tests/test.jpeg.js @@ -246,6 +246,8 @@ describe('JPEG Decoder', function () { testDecodeRect(decoder, 0, 0, 4, 4, data1, display, 24); + display.fillRect(0, 0, 4, 4, [128, 128, 128, 255]); + let data2 = [ // JPEG data 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46,