Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update image snapshot test for Puppeteer v22 #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oney
Copy link

@oney oney commented Jan 20, 2025

Update image snapshot test for Puppeteer v22

Description

Adjusted the image snapshot test to accommodate Puppeteer's change to Uint8Array from Buffer starting in version 22. This update modifies the test assertion to convert Uint8Array to Buffer using Buffer.from before matching with the image snapshot.

Motivation and Context

This change ensures our tests are compatible with the latest updates in Puppeteer. This is crucial as it ensures that our visual regression tests continue to function correctly without any disruptions.

#357

How Has This Been Tested?

The updated tests were run in a local development environment using the latest version of Puppeteer. The changes were verified by confirming that the image snapshots continue to match expected outputs without any errors.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • My changes are in sync with the code style of this project.
  • There aren't any other open Pull Requests for the same issue/update.
  • These changes should be applied to a maintenance branch.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using Jest-Image-Snapshot?

This change will not impact the way developers use Jest-Image-Snapshot, but it will ensure that tests remain robust and compatible with the latest Puppeteer version, thereby preventing any potential issues with snapshot mismatches due to the underlying changes in how screenshots are captured.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants