From b5d9f3f4f00c17a7099e828c6fccda10b4e33f73 Mon Sep 17 00:00:00 2001 From: Wan-Huang Yang Date: Sun, 19 Jan 2025 23:33:40 -0800 Subject: [PATCH] Update image snapshot test for Puppeteer v22 --- examples/__tests__/puppeteer-example.spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/__tests__/puppeteer-example.spec.js b/examples/__tests__/puppeteer-example.spec.js index bf8cf77..bb93452 100644 --- a/examples/__tests__/puppeteer-example.spec.js +++ b/examples/__tests__/puppeteer-example.spec.js @@ -29,6 +29,10 @@ describe('jest-image-snapshot usage with an image received from puppeteer', () = const image = await page.screenshot(); expect(image).toMatchImageSnapshot(); + + // Since v22, Puppeteer returns Uint8Array instead of Buffer + // https://github.com/americanexpress/jest-image-snapshot/issues/357#issuecomment-2394529973 + // expect(Buffer.from(image)).toMatchImageSnapshot(); }); afterAll(async () => {