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

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '10.x', '12.x', '14.x', '16.x' ]
node: [ '14.x', '16.x', '18.x' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16
- name: Install dependencies
run: npm ci
- name: Release
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Thanks `jest-image-snapshot`, that broken header would not have looked good in p
npm i --save-dev jest-image-snapshot
```

Please note that `Jest` `>=20 <=27` is a peerDependency. `jest-image-snapshot` will **not** work with anything below Jest 20.x.x
Please note that `Jest` `>=20 <=29` is a peerDependency. `jest-image-snapshot` will **not** work with anything below Jest 20.x.x

### Invocation

Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/diff-snapshot.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`diff-snapshot diffImageToSnapshot should throw an error if an unknown threshold type is supplied 1`] = `"Unknown failureThresholdType: banana. Valid options are \\"pixel\\" or \\"percent\\"."`;
exports[`diff-snapshot diffImageToSnapshot should throw an error if an unknown threshold type is supplied 1`] = `"Unknown failureThresholdType: banana. Valid options are "pixel" or "percent"."`;
4 changes: 2 additions & 2 deletions __tests__/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ exports[`toMatchImageSnapshot dumpInlineDiffToConsole uses Inline Image Protocol
`;

exports[`toMatchImageSnapshot passes diffImageToSnapshot everything it needs to create a snapshot and compare if needed 1`] = `
Object {
{
"allowSizeMismatch": false,
"blur": 0,
"comparisonMethod": "pixelmatch",
"customDiffConfig": Object {},
"customDiffConfig": {},
"diffDir": undefined,
"diffDirection": "horizontal",
"failureThreshold": 0,
Expand Down
1,278 changes: 644 additions & 634 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Jest matcher for image comparisons. Most commonly used for visual regression testing.",
"main": "src/index.js",
"engines": {
"node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
},
"scripts": {
"lint": "eslint ./ --ignore-path .gitignore --ext .js",
Expand Down Expand Up @@ -53,8 +53,8 @@
"eslint-config-amex": "^7.0.0",
"husky": "^4.2.1",
"image-size": "^0.8.3",
"jest": "^28.0.3",
"jest-snapshot": "^28.0.3",
"jest": "^29.0.0",
"jest-snapshot": "^29.0.0",
"lockfile-lint": "^4.0.0",
"mock-spawn": "^0.2.6",
"semantic-release": "^17.0.4"
Expand All @@ -71,7 +71,7 @@
"ssim.js": "^3.1.1"
},
"peerDependencies": {
"jest": ">=20 <=28"
"jest": ">=20 <=29"
},
"husky": {
"hooks": {
Expand Down