From cb3dcfaf0e788bf9136ec8964004ea9cb4367977 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jan 2024 14:41:12 +0100 Subject: [PATCH 1/2] swap storybook/jest to storybook/test --- package.json | 2 +- stories/atoms/Button.stories.tsx | 2 +- yarn.lock | 374 ++++++++++++++++++++++--------- 3 files changed, 267 insertions(+), 111 deletions(-) diff --git a/package.json b/package.json index d6159eb7..2aaea640 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,9 @@ "@storybook/addon-coverage": "^0.0.9", "@storybook/addon-essentials": "^7.5.3", "@storybook/addon-interactions": "^7.5.3", - "@storybook/jest": "^0.2.2", "@storybook/react": "^7.5.3", "@storybook/react-vite": "^7.5.3", + "@storybook/test": "^7.5.3", "@storybook/testing-library": "^0.2.0", "@types/jest": "^29.0.0", "@types/node": "^16.4.1", diff --git a/stories/atoms/Button.stories.tsx b/stories/atoms/Button.stories.tsx index bddff890..f1647b21 100644 --- a/stories/atoms/Button.stories.tsx +++ b/stories/atoms/Button.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; import type { Meta, StoryObj } from '@storybook/react'; -import { expect } from '@storybook/jest'; +import { expect } from '@storybook/test'; import { within, waitFor, userEvent, waitForElementToBeRemoved } from '@storybook/testing-library'; import { isTestRunner } from '../../.storybook/is-test-runner'; diff --git a/yarn.lock b/yarn.lock index 9704fdb0..b829ed4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,10 +5,10 @@ __metadata: version: 6 cacheKey: 8 -"@adobe/css-tools@npm:^4.3.1": - version: 4.3.1 - resolution: "@adobe/css-tools@npm:4.3.1" - checksum: ad43456379ff391132aff687ece190cb23ea69395e23c9b96690eeabe2468da89a4aaf266e4f8b6eaab53db3d1064107ce0f63c3a974e864f4a04affc768da3f +"@adobe/css-tools@npm:^4.3.2": + version: 4.3.2 + resolution: "@adobe/css-tools@npm:4.3.2" + checksum: 9667d61d55dc3b0a315c530ae84e016ce5267c4dd8ac00abb40108dc98e07b98e3090ce8b87acd51a41a68d9e84dcccb08cdf21c902572a9cf9dcaf830da4ae3 languageName: node linkType: hard @@ -2341,15 +2341,6 @@ __metadata: languageName: node linkType: hard -"@jest/schemas@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/schemas@npm:28.1.3" - dependencies: - "@sinclair/typebox": ^0.24.1 - checksum: 3cf1d4b66c9c4ffda58b246de1ddcba8e6ad085af63dccdf07922511f13b68c0cc480a7bc620cb4f3099a6f134801c747e1df7bfc7a4ef4dceefbdea3e31e1de - languageName: node - linkType: hard - "@jest/schemas@npm:^29.6.3": version: 29.6.3 resolution: "@jest/schemas@npm:29.6.3" @@ -3377,13 +3368,6 @@ __metadata: languageName: node linkType: hard -"@sinclair/typebox@npm:^0.24.1": - version: 0.24.51 - resolution: "@sinclair/typebox@npm:0.24.51" - checksum: fd0d855e748ef767eb19da1a60ed0ab928e91e0f358c1dd198d600762c0015440b15755e96d1176e2a0db7e09c6a64ed487828ee10dd0c3e22f61eb09c478cd0 - languageName: node - linkType: hard - "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -3804,6 +3788,20 @@ __metadata: languageName: node linkType: hard +"@storybook/channels@npm:7.6.10": + version: 7.6.10 + resolution: "@storybook/channels@npm:7.6.10" + dependencies: + "@storybook/client-logger": 7.6.10 + "@storybook/core-events": 7.6.10 + "@storybook/global": ^5.0.0 + qs: ^6.10.0 + telejson: ^7.2.0 + tiny-invariant: ^1.3.1 + checksum: fb91bde253dc685a4c3b13d895766240ec4bc0581622c1d36491bbfe8aa7b86893a8d8ee85309ceced8bf59bba930b15b7b43adc9e746a5976ab11d482fc6011 + languageName: node + linkType: hard + "@storybook/cli@npm:7.5.3": version: 7.5.3 resolution: "@storybook/cli@npm:7.5.3" @@ -3865,6 +3863,15 @@ __metadata: languageName: node linkType: hard +"@storybook/client-logger@npm:7.6.10": + version: 7.6.10 + resolution: "@storybook/client-logger@npm:7.6.10" + dependencies: + "@storybook/global": ^5.0.0 + checksum: 34d176d8328636161f0b9ac0a5e5c7d312af60a24da4c9187fdc903ff936df7a25ccefe1bb9d4e5f1bc570c47cff7d988aa739144e274390a0e0b12eea762442 + languageName: node + linkType: hard + "@storybook/codemod@npm:7.5.3": version: 7.5.3 resolution: "@storybook/codemod@npm:7.5.3" @@ -3958,6 +3965,15 @@ __metadata: languageName: node linkType: hard +"@storybook/core-events@npm:7.6.10": + version: 7.6.10 + resolution: "@storybook/core-events@npm:7.6.10" + dependencies: + ts-dedent: ^2.0.0 + checksum: 49c0b4231ecf076d3b766ae57c84a3e83e8852d42aaf5bdca6d1ee893167aefe342078bd6307f8fa2b242bcd154b17555524e8b7513a8d80bc838b8d5aade28c + languageName: node + linkType: hard + "@storybook/core-server@npm:7.5.3": version: 7.5.3 resolution: "@storybook/core-server@npm:7.5.3" @@ -4043,6 +4059,15 @@ __metadata: languageName: node linkType: hard +"@storybook/csf@npm:^0.1.2": + version: 0.1.2 + resolution: "@storybook/csf@npm:0.1.2" + dependencies: + type-fest: ^2.19.0 + checksum: 22038dfd5e46cd9565c3dec615918c0712eb5fc5f56e9ec89cfa75d7b48667b8fcbf7e9d1f46c9f4d440eee074f1d23a84dc56a937add37b28ddf890fdedfb8a + languageName: node + linkType: hard + "@storybook/docs-mdx@npm:^0.1.0": version: 0.1.0 resolution: "@storybook/docs-mdx@npm:0.1.0" @@ -4064,15 +4089,6 @@ __metadata: languageName: node linkType: hard -"@storybook/expect@npm:storybook-jest": - version: 28.1.3-5 - resolution: "@storybook/expect@npm:28.1.3-5" - dependencies: - "@types/jest": 28.1.3 - checksum: db2bf47d92dc5de97793f98bd12ebc9ca10c1afffbd27c38c268200ab186c75808c9a246a07838c5516229351e31cc47338f950bc918521dfd80efbb5239ed59 - languageName: node - linkType: hard - "@storybook/global@npm:^5.0.0": version: 5.0.0 resolution: "@storybook/global@npm:5.0.0" @@ -4093,15 +4109,18 @@ __metadata: languageName: node linkType: hard -"@storybook/jest@npm:^0.2.2": - version: 0.2.3 - resolution: "@storybook/jest@npm:0.2.3" +"@storybook/instrumenter@npm:7.6.10": + version: 7.6.10 + resolution: "@storybook/instrumenter@npm:7.6.10" dependencies: - "@storybook/expect": storybook-jest - "@testing-library/jest-dom": ^6.1.2 - "@types/jest": 28.1.3 - jest-mock: ^27.3.0 - checksum: 7b8231b6bbc62d1757071401adf4b575d58e23cff5922c2dae2716edb63c8c51d1a3e5179e4a0b2e7b2e591bec77dd622c0c78745ba1740a58fc2d2961bd2c99 + "@storybook/channels": 7.6.10 + "@storybook/client-logger": 7.6.10 + "@storybook/core-events": 7.6.10 + "@storybook/global": ^5.0.0 + "@storybook/preview-api": 7.6.10 + "@vitest/utils": ^0.34.6 + util: ^0.12.4 + checksum: 619828699bd10b2a4b5ac0b6c75b2dec7ff5e92238a40d8720f40ec1b489bed813923a1030814c0304b756c9d8e23d4132bba280e1d2f6790a043a9fafab8d73 languageName: node linkType: hard @@ -4181,6 +4200,28 @@ __metadata: languageName: node linkType: hard +"@storybook/preview-api@npm:7.6.10": + version: 7.6.10 + resolution: "@storybook/preview-api@npm:7.6.10" + dependencies: + "@storybook/channels": 7.6.10 + "@storybook/client-logger": 7.6.10 + "@storybook/core-events": 7.6.10 + "@storybook/csf": ^0.1.2 + "@storybook/global": ^5.0.0 + "@storybook/types": 7.6.10 + "@types/qs": ^6.9.5 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + qs: ^6.10.0 + synchronous-promise: ^2.0.15 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + checksum: df37fe2ac0d94ab8c31821a911483aa6ab5e826ca386e92995ab376d065287c282d3585fdcbcc135ced76149f50efcd0cb854427dc3ff76e3589266f97a77713 + languageName: node + linkType: hard + "@storybook/preview@npm:7.5.3": version: 7.5.3 resolution: "@storybook/preview@npm:7.5.3" @@ -4303,10 +4344,10 @@ __metadata: "@storybook/core-common": ^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0 "@storybook/csf": ^0.1.1 "@storybook/csf-tools": ^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0 - "@storybook/jest": ^0.2.2 "@storybook/preview-api": ^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0 "@storybook/react": ^7.5.3 "@storybook/react-vite": ^7.5.3 + "@storybook/test": ^7.5.3 "@storybook/testing-library": ^0.2.0 "@swc/core": ^1.3.18 "@swc/jest": ^0.2.23 @@ -4355,6 +4396,26 @@ __metadata: languageName: unknown linkType: soft +"@storybook/test@npm:^7.5.3": + version: 7.6.10 + resolution: "@storybook/test@npm:7.6.10" + dependencies: + "@storybook/client-logger": 7.6.10 + "@storybook/core-events": 7.6.10 + "@storybook/instrumenter": 7.6.10 + "@storybook/preview-api": 7.6.10 + "@testing-library/dom": ^9.3.1 + "@testing-library/jest-dom": ^6.1.3 + "@testing-library/user-event": 14.3.0 + "@types/chai": ^4 + "@vitest/expect": ^0.34.2 + "@vitest/spy": ^0.34.1 + chai: ^4.3.7 + util: ^0.12.4 + checksum: 7f98a79a04333e69dea05bcbd6495e6110ce41b13a486662282d7fc6255b1c98d2d3beeaea1dea278447658da2e1bfc3dea21939c62a9767d89bf47c1e85090f + languageName: node + linkType: hard + "@storybook/testing-library@npm:^0.2.0": version: 0.2.2 resolution: "@storybook/testing-library@npm:0.2.2" @@ -4393,6 +4454,18 @@ __metadata: languageName: node linkType: hard +"@storybook/types@npm:7.6.10": + version: 7.6.10 + resolution: "@storybook/types@npm:7.6.10" + dependencies: + "@storybook/channels": 7.6.10 + "@types/babel__core": ^7.0.0 + "@types/express": ^4.7.0 + file-system-cache: 2.3.0 + checksum: ab45a4591c989a64316f53b97d1fad41175ec5ec071726af4cd2a15ff537adafe1729399a9937bb606eab6e72f71c80118ea74902079f40d3ebacfdc20e4d17f + languageName: node + linkType: hard + "@swc/core-darwin-arm64@npm:1.3.96": version: 1.3.96 resolution: "@swc/core-darwin-arm64@npm:1.3.96" @@ -4551,33 +4624,61 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^6.1.2": - version: 6.1.4 - resolution: "@testing-library/jest-dom@npm:6.1.4" +"@testing-library/dom@npm:^9.3.1": + version: 9.3.4 + resolution: "@testing-library/dom@npm:9.3.4" + dependencies: + "@babel/code-frame": ^7.10.4 + "@babel/runtime": ^7.12.5 + "@types/aria-query": ^5.0.1 + aria-query: 5.1.3 + chalk: ^4.1.0 + dom-accessibility-api: ^0.5.9 + lz-string: ^1.5.0 + pretty-format: ^27.0.2 + checksum: dfd6fb0d6c7b4dd716ba3c47309bc9541b4a55772cb61758b4f396b3785efe2dbc75dc63423545c039078c7ffcc5e4b8c67c2db1b6af4799580466036f70026f + languageName: node + linkType: hard + +"@testing-library/jest-dom@npm:^6.1.3": + version: 6.2.1 + resolution: "@testing-library/jest-dom@npm:6.2.1" dependencies: - "@adobe/css-tools": ^4.3.1 + "@adobe/css-tools": ^4.3.2 "@babel/runtime": ^7.9.2 aria-query: ^5.0.0 chalk: ^3.0.0 css.escape: ^1.5.1 - dom-accessibility-api: ^0.5.6 + dom-accessibility-api: ^0.6.3 lodash: ^4.17.15 redent: ^3.0.0 peerDependencies: "@jest/globals": ">= 28" + "@types/bun": "*" "@types/jest": ">= 28" jest: ">= 28" vitest: ">= 0.32" peerDependenciesMeta: "@jest/globals": optional: true + "@types/bun": + optional: true "@types/jest": optional: true jest: optional: true vitest: optional: true - checksum: c6bd9469554136a25d94b55ea16736d56b8c5d200526023774dbf35ca35551a721257e6734f1b404bbd07ae0a1950f1912b5be60e113db2ff2ff50af14f7085c + checksum: 36bb8c23fd102a572bb22e37933c5134c6b4737c9d1ca575d2abde64bd5ffbb5f571caa76c1d8ab0b384670fcc680353f1ef563a2d9a6d46d00c47b4eb38969b + languageName: node + linkType: hard + +"@testing-library/user-event@npm:14.3.0": + version: 14.3.0 + resolution: "@testing-library/user-event@npm:14.3.0" + peerDependencies: + "@testing-library/dom": ">=7.21.4" + checksum: cbd5954460496519cb2ff3fa506ca598d7e4c2e3d2f2e129b21909758f5ec87573aad7d6c79aebffd4bd0ea843315b3064a2a76e545f196bd4c82489cb3afc1d languageName: node linkType: hard @@ -4676,6 +4777,13 @@ __metadata: languageName: node linkType: hard +"@types/chai@npm:^4": + version: 4.3.11 + resolution: "@types/chai@npm:4.3.11" + checksum: d0c05fe5d02b2e6bbca2bd4866a2ab20a59cf729bc04af0060e7a3277eaf2fb65651b90d4c74b0ebf1d152b4b1d49fa8e44143acef276a2bbaa7785fbe5642d3 + languageName: node + linkType: hard + "@types/command-line-args@npm:^5.0.0": version: 5.2.3 resolution: "@types/command-line-args@npm:5.2.3" @@ -4846,16 +4954,6 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:28.1.3": - version: 28.1.3 - resolution: "@types/jest@npm:28.1.3" - dependencies: - jest-matcher-utils: ^28.0.0 - pretty-format: ^28.0.0 - checksum: 28141f2d5b3bafd063362de9790cb8f219488d9b0ad47524a84bef1142a4f0d9d35be0c56988d9f922205225cc83c986acd4be424bd8653b38dc27ab672455e2 - languageName: node - linkType: hard - "@types/jest@npm:^29.0.0": version: 29.5.8 resolution: "@types/jest@npm:29.5.8" @@ -5123,6 +5221,37 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@npm:^0.34.2": + version: 0.34.7 + resolution: "@vitest/expect@npm:0.34.7" + dependencies: + "@vitest/spy": 0.34.7 + "@vitest/utils": 0.34.7 + chai: ^4.3.10 + checksum: 1acf3dffb7f9604f834d1abdeafad54a042ee4a932f3434cfdb5b63280135ef2b52b6aa76cb7348f52d62c80e9123792aa1c19e2dbdfa750cd04442022b862bb + languageName: node + linkType: hard + +"@vitest/spy@npm:0.34.7, @vitest/spy@npm:^0.34.1": + version: 0.34.7 + resolution: "@vitest/spy@npm:0.34.7" + dependencies: + tinyspy: ^2.1.1 + checksum: 4d6c62e153bc37cef5d9691c602e829d53ed5f1ae858ce0b00c8583c902b8736d27da8fdb01d405a3c736463077f7807ecbf831a02c609d612d936a6b576d6dc + languageName: node + linkType: hard + +"@vitest/utils@npm:0.34.7, @vitest/utils@npm:^0.34.6": + version: 0.34.7 + resolution: "@vitest/utils@npm:0.34.7" + dependencies: + diff-sequences: ^29.4.3 + loupe: ^2.3.6 + pretty-format: ^29.5.0 + checksum: d98b8809ada19c207ace43c88d452685adde6966b00e223ac2308b2ea7d0694bdd4d6ff9518ea505e2b5bd4d1b51f44bae430e22fa83ca32c77ad28b61209bc4 + languageName: node + linkType: hard + "@yarnpkg/esbuild-plugin-pnp@npm:^3.0.0-rc.10": version: 3.0.0-rc.15 resolution: "@yarnpkg/esbuild-plugin-pnp@npm:3.0.0-rc.15" @@ -5505,6 +5634,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + "ast-types@npm:0.15.2": version: 0.15.2 resolution: "ast-types@npm:0.15.2" @@ -6044,6 +6180,21 @@ __metadata: languageName: node linkType: hard +"chai@npm:^4.3.10, chai@npm:^4.3.7": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: ^1.1.0 + check-error: ^1.0.3 + deep-eql: ^4.1.3 + get-func-name: ^2.0.2 + loupe: ^2.3.6 + pathval: ^1.1.1 + type-detect: ^4.0.8 + checksum: 9ab84f36eb8e0b280c56c6c21ca4da5933132cd8a0c89c384f1497f77953640db0bc151edd47f81748240a9fab57b78f7d925edfeedc8e8fc98016d71f40c36e + languageName: node + linkType: hard + "chalk@npm:5.3.0, chalk@npm:^5.2.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" @@ -6096,6 +6247,15 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: ^2.0.2 + checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + "chokidar@npm:^3.4.0, chokidar@npm:^3.5.1, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -6647,6 +6807,15 @@ __metadata: languageName: node linkType: hard +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: ^4.0.0 + checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f + languageName: node + linkType: hard + "deep-equal@npm:^2.0.5": version: 2.2.3 resolution: "deep-equal@npm:2.2.3" @@ -6854,14 +7023,7 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^28.1.1": - version: 28.1.1 - resolution: "diff-sequences@npm:28.1.1" - checksum: e2529036505567c7ca5a2dea86b6bcd1ca0e3ae63bf8ebf529b8a99cfa915bbf194b7021dc1c57361a4017a6d95578d4ceb29fabc3232a4f4cb866a2726c7690 - languageName: node - linkType: hard - -"diff-sequences@npm:^29.6.3": +"diff-sequences@npm:^29.4.3, diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" checksum: f4914158e1f2276343d98ff5b31fc004e7304f5470bf0f1adb2ac6955d85a531a6458d33e87667f98f6ae52ebd3891bb47d420bb48a5bd8b7a27ee25b20e33aa @@ -6911,13 +7073,20 @@ __metadata: languageName: node linkType: hard -"dom-accessibility-api@npm:^0.5.6, dom-accessibility-api@npm:^0.5.9": +"dom-accessibility-api@npm:^0.5.9": version: 0.5.16 resolution: "dom-accessibility-api@npm:0.5.16" checksum: 005eb283caef57fc1adec4d5df4dd49189b628f2f575af45decb210e04d634459e3f1ee64f18b41e2dcf200c844bc1d9279d80807e686a30d69a4756151ad248 languageName: node linkType: hard +"dom-accessibility-api@npm:^0.6.3": + version: 0.6.3 + resolution: "dom-accessibility-api@npm:0.6.3" + checksum: c325b5144bb406df23f4affecffc117dbaec9af03daad9ee6b510c5be647b14d28ef0a4ea5ca06d696d8ab40bb777e5fed98b985976fdef9d8790178fa1d573f + languageName: node + linkType: hard + "dom-serializer@npm:0": version: 0.2.2 resolution: "dom-serializer@npm:0.2.2" @@ -8017,6 +8186,13 @@ __metadata: languageName: node linkType: hard +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + "get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": version: 1.2.2 resolution: "get-intrinsic@npm:1.2.2" @@ -9278,18 +9454,6 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^28.1.3": - version: 28.1.3 - resolution: "jest-diff@npm:28.1.3" - dependencies: - chalk: ^4.0.0 - diff-sequences: ^28.1.1 - jest-get-type: ^28.0.2 - pretty-format: ^28.1.3 - checksum: fa8583e0ccbe775714ce850b009be1b0f6b17a4b6759f33ff47adef27942ebc610dbbcc8a5f7cfb7f12b3b3b05afc9fb41d5f766674616025032ff1e4f9866e0 - languageName: node - linkType: hard - "jest-diff@npm:^29.7.0": version: 29.7.0 resolution: "jest-diff@npm:29.7.0" @@ -9338,13 +9502,6 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^28.0.2": - version: 28.0.2 - resolution: "jest-get-type@npm:28.0.2" - checksum: 5281d7c89bc8156605f6d15784f45074f4548501195c26e9b188742768f72d40948252d13230ea905b5349038865a1a8eeff0e614cc530ff289dfc41fe843abd - languageName: node - linkType: hard - "jest-get-type@npm:^29.6.3": version: 29.6.3 resolution: "jest-get-type@npm:29.6.3" @@ -9418,18 +9575,6 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^28.0.0": - version: 28.1.3 - resolution: "jest-matcher-utils@npm:28.1.3" - dependencies: - chalk: ^4.0.0 - jest-diff: ^28.1.3 - jest-get-type: ^28.0.2 - pretty-format: ^28.1.3 - checksum: 6b34f0cf66f6781e92e3bec97bf27796bd2ba31121e5c5997218d9adba6deea38a30df5203937d6785b68023ed95cbad73663cc9aad6fb0cb59aeb5813a58daf - languageName: node - linkType: hard - "jest-matcher-utils@npm:^29.7.0": version: 29.7.0 resolution: "jest-matcher-utils@npm:29.7.0" @@ -9459,7 +9604,7 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^27.0.6, jest-mock@npm:^27.3.0": +"jest-mock@npm:^27.0.6": version: 27.5.1 resolution: "jest-mock@npm:27.5.1" dependencies: @@ -10132,6 +10277,15 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: ^2.0.1 + checksum: 96c058ec7167598e238bb7fb9def2f9339215e97d6685d9c1e3e4bdb33d14600e11fe7a812cf0c003dfb73ca2df374f146280b2287cae9e8d989e9d7a69a203b + languageName: node + linkType: hard + "lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": version: 10.0.2 resolution: "lru-cache@npm:10.0.2" @@ -11191,6 +11345,13 @@ __metadata: languageName: node linkType: hard +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 090e3147716647fb7fb5b4b8c8e5b55e5d0a6086d085b6cd23f3d3c01fcf0ff56fd3cc22f2f4a033bd2e46ed55d61ed8379e123b42afe7d531a2a5fc8bb556d6 + languageName: node + linkType: hard + "peek-stream@npm:^1.1.0": version: 1.1.3 resolution: "peek-stream@npm:1.1.3" @@ -11397,19 +11558,7 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^28.0.0, pretty-format@npm:^28.1.3": - version: 28.1.3 - resolution: "pretty-format@npm:28.1.3" - dependencies: - "@jest/schemas": ^28.1.3 - ansi-regex: ^5.0.1 - ansi-styles: ^5.0.0 - react-is: ^18.0.0 - checksum: e69f857358a3e03d271252d7524bec758c35e44680287f36c1cb905187fbc82da9981a6eb07edfd8a03bc3cbeebfa6f5234c13a3d5b59f2bbdf9b4c4053e0a7f - languageName: node - linkType: hard - -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.5.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" dependencies: @@ -13106,6 +13255,13 @@ __metadata: languageName: node linkType: hard +"tinyspy@npm:^2.1.1": + version: 2.2.0 + resolution: "tinyspy@npm:2.2.0" + checksum: 36431acaa648054406147a92b9bde494b7548d0f9f3ffbcc02113c25a6e59f3310cbe924353d7f4c51436299150bec2dbb3dc595748f58c4ddffea22d5baaadb + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -13338,7 +13494,7 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:4.0.8": +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 From 391945df5a697c027af50db821a5d9d85b7e7bc1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jan 2024 15:21:56 +0100 Subject: [PATCH 2/2] migrate storybook/testing-library to storybook/test --- package.json | 1 - stories/atoms/Button.stories.tsx | 2 +- stories/expected-failures/Failure.stories.tsx | 2 +- stories/pages/Page.stories.tsx | 2 +- yarn.lock | 37 ------------------- 5 files changed, 3 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 2aaea640..df49ceec 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "@storybook/react": "^7.5.3", "@storybook/react-vite": "^7.5.3", "@storybook/test": "^7.5.3", - "@storybook/testing-library": "^0.2.0", "@types/jest": "^29.0.0", "@types/node": "^16.4.1", "@vitejs/plugin-react": "^4.0.3", diff --git a/stories/atoms/Button.stories.tsx b/stories/atoms/Button.stories.tsx index f1647b21..c82d2e46 100644 --- a/stories/atoms/Button.stories.tsx +++ b/stories/atoms/Button.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; import type { Meta, StoryObj } from '@storybook/react'; import { expect } from '@storybook/test'; -import { within, waitFor, userEvent, waitForElementToBeRemoved } from '@storybook/testing-library'; +import { within, waitFor, userEvent, waitForElementToBeRemoved } from '@storybook/test'; import { isTestRunner } from '../../.storybook/is-test-runner'; diff --git a/stories/expected-failures/Failure.stories.tsx b/stories/expected-failures/Failure.stories.tsx index 9f2ea5aa..fe6e9cd7 100644 --- a/stories/expected-failures/Failure.stories.tsx +++ b/stories/expected-failures/Failure.stories.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { within, userEvent } from '@storybook/testing-library'; +import { within, userEvent } from '@storybook/test'; import { Page } from '../pages/Page'; diff --git a/stories/pages/Page.stories.tsx b/stories/pages/Page.stories.tsx index fe55d19a..469d4845 100644 --- a/stories/pages/Page.stories.tsx +++ b/stories/pages/Page.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react'; -import { within, userEvent } from '@storybook/testing-library'; +import { within, userEvent } from '@storybook/test'; import { Page } from './Page'; diff --git a/yarn.lock b/yarn.lock index b829ed4e..d6b35972 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4348,7 +4348,6 @@ __metadata: "@storybook/react": ^7.5.3 "@storybook/react-vite": ^7.5.3 "@storybook/test": ^7.5.3 - "@storybook/testing-library": ^0.2.0 "@swc/core": ^1.3.18 "@swc/jest": ^0.2.23 "@types/jest": ^29.0.0 @@ -4416,17 +4415,6 @@ __metadata: languageName: node linkType: hard -"@storybook/testing-library@npm:^0.2.0": - version: 0.2.2 - resolution: "@storybook/testing-library@npm:0.2.2" - dependencies: - "@testing-library/dom": ^9.0.0 - "@testing-library/user-event": ^14.4.0 - ts-dedent: ^2.2.0 - checksum: 8ccdc1fbbb3472264c56b0aaf2f1c5d273f1ae9b230a53adf9cf82bf82c1a555550894f0e8869c206fa07b1fe8423da4d56590377756c58de3ec560b35a96c46 - languageName: node - linkType: hard - "@storybook/theming@npm:7.5.3": version: 7.5.3 resolution: "@storybook/theming@npm:7.5.3" @@ -4608,22 +4596,6 @@ __metadata: languageName: node linkType: hard -"@testing-library/dom@npm:^9.0.0": - version: 9.3.3 - resolution: "@testing-library/dom@npm:9.3.3" - dependencies: - "@babel/code-frame": ^7.10.4 - "@babel/runtime": ^7.12.5 - "@types/aria-query": ^5.0.1 - aria-query: 5.1.3 - chalk: ^4.1.0 - dom-accessibility-api: ^0.5.9 - lz-string: ^1.5.0 - pretty-format: ^27.0.2 - checksum: 34e0a564da7beb92aa9cc44a9080221e2412b1a132eb37be3d513fe6c58027674868deb9f86195756d98d15ba969a30fe00632a4e26e25df2a5a4f6ac0686e37 - languageName: node - linkType: hard - "@testing-library/dom@npm:^9.3.1": version: 9.3.4 resolution: "@testing-library/dom@npm:9.3.4" @@ -4682,15 +4654,6 @@ __metadata: languageName: node linkType: hard -"@testing-library/user-event@npm:^14.4.0": - version: 14.5.1 - resolution: "@testing-library/user-event@npm:14.5.1" - peerDependencies: - "@testing-library/dom": ">=7.21.4" - checksum: 3e6bc9fd53dfe2f3648190193ed2fd4bca2a1bfb47f68810df3b33f05412526e5fd5c4ef9dc5375635e0f4cdf1859916867b597eed22bda1321e04242ea6c519 - languageName: node - linkType: hard - "@tsconfig/node10@npm:^1.0.7": version: 1.0.9 resolution: "@tsconfig/node10@npm:1.0.9"