Skip to content

Commit

Permalink
deps(jest): fix chromatic jest related bug (#199)
Browse files Browse the repository at this point in the history
Chromatic [tests were failing](https://github.com/cfpb/design-system-react/actions/runs/6433456084/job/17470552029?pr=194#step:5:143) with a weird `Error: page.evaluate: TypeError: expect.extend: `default` is not a valid matcher. Must be a function, is "object"` error. 

## Changes

- updates the version for `"@storybook/jest"` to `"^0.2.2",` to fix a bug with the jest/storybook integration ([see the issue thread](storybookjs/storybook#24194))

## How to test this PR

1. Make sure storybook still works as intended
2. Note that chromatic no longer fails in CI on this PR

## Screenshots

<img width="1264" alt="Screenshot 2023-10-11 at 7 35 34 AM" src="https://github.com/cfpb/design-system-react/assets/19983248/4f6a9212-ffbf-41d2-bc2c-e219b8c9131d">
  • Loading branch information
billhimmelsbach authored Oct 11, 2023
1 parent b385c43 commit 91ad005
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@storybook/addon-interactions": "^7.4.3",
"@storybook/addon-links": "^7.0.6",
"@storybook/client-api": "^7.4.3",
"@storybook/jest": "^0.1.0",
"@storybook/jest": "^0.2.2",
"@storybook/manager-api": "^7.3.2",
"@storybook/react": "^7.0.6",
"@storybook/react-vite": "^7.0.6",
Expand Down
41 changes: 27 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ __metadata:
languageName: node
linkType: hard

"@adobe/css-tools@npm:^4.0.1":
"@adobe/css-tools@npm:^4.0.1, @adobe/css-tools@npm:^4.3.0":
version: 4.3.1
resolution: "@adobe/css-tools@npm:4.3.1"
checksum: ad43456379ff391132aff687ece190cb23ea69395e23c9b96690eeabe2468da89a4aaf266e4f8b6eaab53db3d1064107ce0f63c3a974e864f4a04affc768da3f
Expand Down Expand Up @@ -4185,15 +4185,15 @@ __metadata:
languageName: node
linkType: hard

"@storybook/jest@npm:^0.1.0":
version: 0.1.0
resolution: "@storybook/jest@npm:0.1.0"
"@storybook/jest@npm:^0.2.2":
version: 0.2.3
resolution: "@storybook/jest@npm:0.2.3"
dependencies:
"@storybook/expect": storybook-jest
"@storybook/instrumenter": ^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0
"@testing-library/jest-dom": ^5.16.2
"@testing-library/jest-dom": ^6.1.2
"@types/jest": 28.1.3
jest-mock: ^27.3.0
checksum: 74a4b9dc0ce921f72c2f4fbba053e4a4c84a6a16d07406492a26733f55438229197e547364d0848ac3df38ab5ce9e20829029196d376a267033d8e75904ab611
checksum: 7b8231b6bbc62d1757071401adf4b575d58e23cff5922c2dae2716edb63c8c51d1a3e5179e4a0b2e7b2e591bec77dd622c0c78745ba1740a58fc2d2961bd2c99
languageName: node
linkType: hard

Expand Down Expand Up @@ -4602,20 +4602,33 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/jest-dom@npm:^5.16.2":
version: 5.17.0
resolution: "@testing-library/jest-dom@npm:5.17.0"
"@testing-library/jest-dom@npm:^6.1.2":
version: 6.1.3
resolution: "@testing-library/jest-dom@npm:6.1.3"
dependencies:
"@adobe/css-tools": ^4.0.1
"@adobe/css-tools": ^4.3.0
"@babel/runtime": ^7.9.2
"@types/testing-library__jest-dom": ^5.9.1
aria-query: ^5.0.0
chalk: ^3.0.0
css.escape: ^1.5.1
dom-accessibility-api: ^0.5.6
lodash: ^4.17.15
redent: ^3.0.0
checksum: 9f28dbca8b50d7c306aae40c3aa8e06f0e115f740360004bd87d57f95acf7ab4b4f4122a7399a76dbf2bdaaafb15c99cc137fdcb0ae457a92e2de0f3fbf9b03b
peerDependencies:
"@jest/globals": ">= 28"
"@types/jest": ">= 28"
jest: ">= 28"
vitest: ">= 0.32"
peerDependenciesMeta:
"@jest/globals":
optional: true
"@types/jest":
optional: true
jest:
optional: true
vitest:
optional: true
checksum: 5bd14ba31fd3d64cff8ca55cccd335bedadf1db1119643954ca8cd30af835defe6f3a21e7d7617d20205b07abba1b2e668be1b9d6743504800f17fdc4344db75
languageName: node
linkType: hard

Expand Down Expand Up @@ -7831,7 +7844,7 @@ __metadata:
"@storybook/addon-interactions": ^7.4.3
"@storybook/addon-links": ^7.0.6
"@storybook/client-api": ^7.4.3
"@storybook/jest": ^0.1.0
"@storybook/jest": ^0.2.2
"@storybook/manager-api": ^7.3.2
"@storybook/react": ^7.0.6
"@storybook/react-vite": ^7.0.6
Expand Down

0 comments on commit 91ad005

Please sign in to comment.