Update image snapshot test for Puppeteer v22 #364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Checklist:
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.