americanexpress / jest-image-snapshot

✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Apache License 2.0
3.85k stars 200 forks source link

chore(jest)!: add support for jest v29 #309

Closed aloisklink closed 2 years ago

aloisklink commented 2 years ago

Description

Add support for Jest v29.

Jest v29 drops support for Node v12/v17, so I've updated the package.json to contain the same Node support as Jest.

The only other major breaking change in Jest v29 is that the default snapshot format has changed slightly, but that only changes the stored jest snapshots slighty (see https://jestjs.io/blog/2022/08/25/jest-29).

BREAKING CHANGE: Drop support for Node v12 and Node v17, as Jest v29 does not support these versions.

Motivation and Context

Resolves #308

How Has This Been Tested?

I've tried testing this branch on my own project (remark-mermaid-dataurl) using the following, and it seems to work fine.

    "jest": "^29.0.0",
    "jest-image-snapshot": "git+https://github.com/aloisklink/jest-image-snapshot.git#chore/update-jest-to-v29",

Types of Changes

Checklist:

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

Adds support for Jest 29.

BREAKING CHANGE: Drops support for Node v12 and Node v17.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

Remi-p commented 2 years ago

Hey, I don't have the skills to validate the "code" part of your PR, but using your branch & jest 29

    "jest": "^29.0.0",
    "jest-image-snapshot": "git+https://github.com/aloisklink/jest-image-snapshot.git#chore/update-jest-to-v29",

works in one of our project too. Thanks for the MR!

nbeloglazov commented 2 years ago

Hi folks! Any update on this PR? Would be nice to get rid of warnings when running npm install about jest-image-snapshot not being compatable with jest 29.

nbeloglazov commented 2 years ago

@anescobar1991 could you review this PR? Or someone from one-amex-admins :)

Corrob commented 2 years ago

Is there a reason this isn't being approved? Are there any risks involved?

This is blocking all projects that use this jest-image-snapshot from upgrading to jest 29 so it would be nice to sort this out sooner than later.

oneamexbot commented 2 years ago

:tada: This PR is included in version 6.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Corrob commented 2 years ago

Thanks for getting this one out the door!