{"_id":"@storybook/testing-vue3","_rev":"30-e9c7015f2dea63c77acb0a8fd0dab7ea","name":"@storybook/testing-vue3","dist-tags":{"canary":"1.0.0-canary.13.c3b6b8a.0","latest":"1.0.0"},"versions":{"0.0.1":{"name":"@storybook/testing-vue3","version":"0.0.1","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@0.0.1","maintainers":[{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"da9db7d9d85419989e7d5cd71f6f6ee9d260fb60","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-0.0.1.tgz","fileCount":17,"integrity":"sha512-a4FqoDr5aUeA0BRcbTXkcjIELezB1iWCZuut97L+mvGje65Adg6JciaukTlcCBjex7FAohP/ZUXcRMNlwnmInA==","signatures":[{"sig":"MEQCIDyukAo7WW/WfNKlT06PsCtl6X/PfEmV/fQqUUIG5sVVAiAjHINPNcZ9J7jUpuygO76sdTDrywt+ZsFKgwRr/nLzpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":57828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2cblCRA9TVsSAnZWagAACw0P/i3t4i109dEuMn/il2Z+\nkY2Q0vMzb+N/dQ6x4ks9lTQtlLbX3O4qL+PLQ+n9bW73e0MKhw4D0vCvpchl\njd2tWnx4cNJele1fl46OnSjZ0qCQdmLEs2udwxQNNxHAQ655cOak1B8127Gl\nomo7nOL2NVTjHnhC+NG8WoSqr5AMxe9C3YElWI8hARhj17fv/xDsrp7bwrbM\nJcu8CMbjofilyg/jVUFsw/zLhFT/wtVs5Q3mgc3Tmg5Ilo+ndvg8oq9AYFIm\nLVMjWurrHYWIJlaYxBZ+XkNonOIXLlRcH2QRKkz/4ZUo++Vy7pWnwr+Cp2yy\nm9w5A0yRYl4ziNq7PmI8uhiigc5+UkfsYsuDypQN1J+ZfQ/uc3OWEblEGBVe\nbxeWLP7ZGxf1F/Jf+jrPbp+mb1v3fqr0ThuFQxIuIktPFpuT4zDun4qxutys\njUHTlX14DkulWLl32AGXgHUOOiXdL50IYfTlSCh/Afd4C9RZUeKG3qTFZ1rn\nMRCto1Ua/tN3zg8uuOwLh4RFjxtK48zpb7h70zcf49wRNT2Lkq0b4xj6f/xV\n9Fgh57GKyacs6GR4BJh4so0FR3hVVhKqZFCID94Nr1gi/CV0p+srOsE+tksY\nvh/N4DVwJ/L7mxq+Uioa4xihSngTqbllLe8u2gkW/HxL+zAWpX72/VeBaei9\n/zkX\r\n=WeY8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","gitHead":"162c4ac495e939980de634d89939e6d24b7311a8","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"6.14.8","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"14.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.2.3","concurrently":"^6.0.0","@storybook/vue3":"^6.0.0","@storybook/addons":"^6.0.0","@storybook/client-api":"^6.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^6.0.0","@storybook/addons":"^6.0.0","@storybook/client-api":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_0.0.1_1621978194529_0.20454908054936993","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@storybook/testing-vue3","version":"0.0.2","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@0.0.2","maintainers":[{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"186e3add9e69a885151eeae0e4cd75305c97c2f5","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-0.0.2.tgz","fileCount":17,"integrity":"sha512-kmgv+zddTzZwQx5AYz0zM/ySJ/2lmNNij8WvXDy9u84fnc3HZPQ1yckUYtviaKty8VFB/TZaqxEqNm37wKd03Q==","signatures":[{"sig":"MEQCIHcLLTSBv/X5rdq8eCY43NoGt6S51Jxl6Zqsc/Uh7W+7AiBV/2atwEXG8A6nOc5M+f8GnGDmbVKiJA7lldRr8HGHSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+/BkCRA9TVsSAnZWagAAK/8P/iQr1k7HZgbpE8M+nlaY\n0s8i9JBeG7AGs9jJj2BGYRJlvzTrpbXUWTcc0rW5xLK1TdU0LIIG6MerZGud\nOuA7CINHyhG9opViMfJm27aZdgX1h0jeZ657nkqHK//pM6t5doxkaWyBPS87\nzH10b2l9i+gSVs7hS3tKwooial1EkWnRfuV5h6kA0aGK5ia0ccNlSTK6Pap4\nGc6zIkkepMu7wVo8rAEJUA758xyq8VfF5O1jibLMAtGM3io1bBvQgOvd0fXD\nupGArcSlQ4qtNVlg/PkiCetfZIUAofZYuWsg2m8UIFfX2kcM5JKIaSQJ3Qk6\nCaCjtJsRSpn5+vuCoAtszl1T4NZ3IIEZTcFtj9169g+0vwAOwReqNmMGDBaE\nq/gMNz2tappTZW6r6I7zK47HxtgwqA2Q6PsSSSEB0krulmrgIs8ghFx6ydM9\nfjGGrvHV4aZB5kRW0fq44Mk5IurzK5OR/B5tKqNAHLgTzLifUMdKKK4Kc4/1\nDpG2+gx02RG5IU0dY6/By8MGUqMo0r0e6PZBS7RIC03tIZM3taE8HuNPWWrP\nd60Ban7SrkwQ9vClczSub+w3nAquE2gfKFqo+D0PFWIG5HCB0jIeNLoZeVIw\nKKrq9koJ6Vb5iS1u/F8MTYXQh++25bVBGke/vmj0GRtiS/LJihiZPvYtSoic\nt7sV\r\n=Qw4m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","gitHead":"5ec689346e27d2b5b376c264830a9cfd7255676d","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"6.14.15","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"14.18.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.2.3","concurrently":"^6.0.0","@storybook/vue3":"^6.0.0","@storybook/addons":"^6.0.0","@storybook/client-api":"^6.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^6.0.0","@storybook/addons":"^6.0.0","@storybook/client-api":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_0.0.2_1643901028395_0.9625982785023233","host":"s3://npm-registry-packages"}},"0.0.3-canary.54c9d3b.0":{"name":"@storybook/testing-vue3","version":"0.0.3-canary.54c9d3b.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@0.0.3-canary.54c9d3b.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"600d9cc7e8b39402d06cb18a4aa4cbfdfa5b1faf","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-0.0.3-canary.54c9d3b.0.tgz","fileCount":18,"integrity":"sha512-Mn0eMbkYvK1b689RdfVnj3A35TZCBOSSe2lO+wudGXfnwGQnyCjzEv4aL63CaOmPW/M0MxgL1i6tW0JkrE8RQg==","signatures":[{"sig":"MEYCIQCByRACeTpPOlc0WIcAsiTpJA1+Qt5v4L5AWgLDqKV7BQIhAMrORJKSipq1johT/0/JqP+egQ20ZBXWypWlpW2vQER6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66256},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"54c9d3b35d8b89170ba56932f0ed49c7161284ed","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"future","@storybook/addons":"future","@storybook/preview-api":"future","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"future","@storybook/addons":"future","@storybook/preview-api":"future"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_0.0.3-canary.54c9d3b.0_1688722353120_0.23123508384058034","host":"s3://npm-registry-packages"}},"0.0.3-canary.d106089.0":{"name":"@storybook/testing-vue3","version":"0.0.3-canary.d106089.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@0.0.3-canary.d106089.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"799c7db8c6461023f271ebf85236f8398b3e56ab","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-0.0.3-canary.d106089.0.tgz","fileCount":18,"integrity":"sha512-DHRzeltdAX62AU+5zLmYAd+JCdZHhRIqojOrwHw0mZt1dyEMWkLQN49m6ujrvAACCbdTmGDS+3Kb+jCGoj8KMw==","signatures":[{"sig":"MEYCIQDye6DYmYsPvCEGi1P20EUZjo2ZJ4Q8MLnDcn3umlwY2gIhANtU4ZPAQvIpnbjU/TBmB+cgQ+dR2AckkRxXuwAA8CGI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66338},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"d106089fd0acd3606dad9a5b15c8e7188cfeab24","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_0.0.3-canary.d106089.0_1688722575792_0.6708587758328628","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.922565e.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.922565e.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.922565e.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"aec9dd60ab860c30a1f9804c1bc65599922af668","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.922565e.0.tgz","fileCount":18,"integrity":"sha512-1quJss6FbXR3JT9Ofy3AXUhG8K7AYduvZG/dlixmwfRfqrj3nqu799OHDx5VV6RPoe2X16e3EzuaCrx9RE1eTA==","signatures":[{"sig":"MEUCIH/QDTDV2TrZMH4G6kFz4qAB04D14Ll+xXfb/KpryXRBAiEA5g85k3bzCic7pVSMlhr+4Cja0Zhy7/5RhfvRhDS6hMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66341},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"922565e8b44fd8758f8215c974044b51af4e68f7","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.922565e.0_1688722807974_0.3243221151062803","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.08676b5.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.08676b5.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.08676b5.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"229a2410b0439beecd5e9a52f364fcb3571d944e","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.08676b5.0.tgz","fileCount":18,"integrity":"sha512-HM7rhlFLEdDRhg/andUSI939WW7cXig3R5dDbS2kf6NEMeSupEYKsMfxATmKalBshcJ8Ng0cJe40Gsux0FeBxw==","signatures":[{"sig":"MEYCIQDO98hYtM5RXAUoJMDxd2QP3MihEDEXYw693rcQtxcdGgIhAOIDJTRTHWq9QTl/cJkO8MrJ0B9bubKwVJST2czmDZ69","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66341},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"08676b536d3be04d37e6fb790ad869a7dd8771a9","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.08676b5.0_1688723306275_0.709887021724553","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.cf0d543.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.cf0d543.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.cf0d543.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"e7b2270e73b76ca506c5d6a0cd4bcbe2c1e38567","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.cf0d543.0.tgz","fileCount":18,"integrity":"sha512-do5QmJIg9nWZroMKkgaU4vCAty2C2crVkDFIujMSBplWCnzL5B4AGeA5f66xxcBZFxEKNn+hxMVYmrjE8lHJkg==","signatures":[{"sig":"MEQCIGvgcQwphWnSE/mKuq6zaHRbBBPYIPmlHuxPrwVs/nh7AiBWFN+4Of8+L/k1P9eFR39nQ4BQfxzAKdD4r6yrZTuasA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66341},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"cf0d543f9c10df8e29b01dda17f4898f2d88bf82","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.cf0d543.0_1688723495059_0.42489878723271457","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.cce520c.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.cce520c.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.cce520c.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"921f6b17677dd27f1ff3a2b939948fe912d8a0b0","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.cce520c.0.tgz","fileCount":18,"integrity":"sha512-5Qe1y3jiuxWtNIdjKjaJnk7F/tOE6ErY6YvdL5R1vrojsTKVnUM7Pcwb5YvrdBWBxu92e+triCiJTEvjUyifYA==","signatures":[{"sig":"MEYCIQCaStxehGddapK9RcEk4xuZe4aro97qmrj4j8mgq6IWWAIhAN+Stqp2AlR6FZGescnW7fGkVAf1kFHtSsbI+q2ezDu1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66341},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"cce520c639f3235fe0db3246a419c54a5ec27dbb","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example cy:run","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example cy"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.cce520c.0_1688762958194_0.15327583964531066","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.c9f67c9.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.c9f67c9.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.c9f67c9.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"988e096da86b820882e98b08eca5cd0e8dfa50c2","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.c9f67c9.0.tgz","fileCount":20,"integrity":"sha512-80+Oc/Lyc93Ek5dkT0OG9IxR8zAYac2YJ//PyGNGnwcbi1js7soaXKo5LCwxIISDakd4jXSwg/iQXvO0T4pk2A==","signatures":[{"sig":"MEYCIQCXlrd6u+kCQWbQTMO43EK4hUPCAyKMPmiqVFmaqTSS7AIhAIVnt8uKdLzhXQkuFRCZasZtEK24n3eSWjdt9Z1wRIya","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75249},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"c9f67c9a95fbf5600f1082c2250032d3fbb80515","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example vitest"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","dependencies":{"caniuse-lite":"^1.0.30001517"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.c9f67c9.0_1689802858330_0.8773902055793661","host":"s3://npm-registry-packages"}},"0.0.3-canary.9529a78.0":{"name":"@storybook/testing-vue3","version":"0.0.3-canary.9529a78.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@0.0.3-canary.9529a78.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"b8316ce6d2d43eb1e4c192888d61bad841b83ca8","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-0.0.3-canary.9529a78.0.tgz","fileCount":20,"integrity":"sha512-TfbrOLuMFCCw1wGr2RWj2DJ7LtzDiFv+wIg7BeMVZrQIfE1Vf0RDFKnZdtEfROdYrbuPUxx+kgrasDoazyUkNQ==","signatures":[{"sig":"MEUCIE8/2wRIHfQONDwEeqTYnKDnsPFNSwSQ7kyPuiZxU+WEAiEAjBB5AcRBGd7a0iuHSbnWxAg+8kLaIowkC5o467lySKY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278141},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"9529a780e7aa764859ad4bea281e816d72477034","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && yarn --cwd example yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit","test:watch":"yarn build && yarn --cwd example vitest"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","dependencies":{"caniuse-lite":"^1.0.30001517"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_0.0.3-canary.9529a78.0_1690107825283_0.6965364211075058","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.701b12d.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.701b12d.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.701b12d.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"04860a75be35a688735722755e7127192261c2ef","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.701b12d.0.tgz","fileCount":16,"integrity":"sha512-9Q/SZ4aBcgJDDHqM65X4sCFt885SkuuQOVkyE0r9TCX0NP3HSVjeZ2P6mQcWzHB5Zgu/1GTdq5y9K0qFWFbe2A==","signatures":[{"sig":"MEUCIQC2RCjeZh7JZ3TpdykJhTcVyhXn5Ihb8fWvadfl7BtWKgIgM2AvDxpqHcjfQL54u8sn/LshaeHImbFl6c2R/xC4qT0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50747},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"701b12d8077f648b31d2d13c0a1bd97405647cd3","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.701b12d.0_1690125231858_0.38735622811428816","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.97b6ad4.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.97b6ad4.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.97b6ad4.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"b643975998f1c0149e0b3ac24829a339b97a9968","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.97b6ad4.0.tgz","fileCount":16,"integrity":"sha512-01dZAdRbtl2PraBhZlLBrVstLx50N+AEj5YU9V+mUC/6WBdHHrdzTuBAVViwlYz81FDcAhsb5BNYfElmwVj0gQ==","signatures":[{"sig":"MEQCIHRnej8r78PZwFawCIXvw3T8d0S9aiGVPLGquiM4JShCAiAqrBlsagU5IOtpTSfvDkH9MV7K6iShdPEVCd5eOvdBVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50747},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"97b6ad4cc1690d2c21c0cca54de0d2f210518b5c","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.97b6ad4.0_1690125408514_0.22726122723565623","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.5d50275.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.5d50275.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.5d50275.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"3293eaa22152ad36c9746f66a23d1da6cfc4dd19","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.5d50275.0.tgz","fileCount":16,"integrity":"sha512-B/E/vz+BJZtm48z2BlA5GFm61gyS3Dc3NQ+FvFW3ygA5+dUYpXpspHNgv9wyx19AzP68JqLHsym+fI4QdsXthA==","signatures":[{"sig":"MEUCIQD3M/aZtrA2S5a8g74WlCnkKv/rY4Juvij6Jxfh2mXPqwIgeat6Sfa6lmz6ybbSp6zLR9nkRsUhoyFtEE+bo6TaKSc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50747},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"5d502758a8e57218bdc6355b1134363e7864f128","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.5d50275.0_1690125679912_0.7969246280495157","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.54193a7.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.54193a7.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.54193a7.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"35b6480a23c9ff3e060aab7156bbfc9684aef36d","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.54193a7.0.tgz","fileCount":16,"integrity":"sha512-6jSIBIzlAUdOQ+ROWAXtd/betry7Hu9FcqMbyelKEQc2zEnuUTMEuCkaDN/k7KWAAbJYSFhIPMrCodoU9ZdxxQ==","signatures":[{"sig":"MEUCIEjIad6aVY6vl1NTphC2esRbytBFPDrVvTEuE36XI04UAiEAhFggwDNrto+rtLsIjZfvUsxzD9sKWEH0gfXXwfVZB7g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50747},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"54193a7de1f27c0f59a01f929c67d31a649448e7","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.54193a7.0_1690126050188_0.23775202785927663","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.7690fa2.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.7690fa2.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.7690fa2.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"3aa290d0d814f88390039f5bd98f8fcaa799fbde","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.7690fa2.0.tgz","fileCount":16,"integrity":"sha512-aakYZsr49pO+x29vpSOQxu9EX+JPNuTVyRpU1MDlN3ahWOA+ypgq5SQz7FoyPbbXBAgWxo2Uho8z3KwGiQSliw==","signatures":[{"sig":"MEUCIAjjQoE0d+DkJSg/4In9q24Dq7Bxz+W0jaTZ3Dh+by9TAiEAv4qPlkO45kgxiBQd8P6YkEiQA+B8X8sI4mSKDstF4VM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50915},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"7690fa2ab205764bcb8736723caf6fa51b597e17","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.7690fa2.0_1690138304093_0.5811422979400551","host":"s3://npm-registry-packages"}},"1.0.0-canary.13.c3b6b8a.0":{"name":"@storybook/testing-vue3","version":"1.0.0-canary.13.c3b6b8a.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0-canary.13.c3b6b8a.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"76d43eb707a2a6d96ff3dfdb6cd7fbe8de5af336","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0-canary.13.c3b6b8a.0.tgz","fileCount":16,"integrity":"sha512-SRnN66xZlFhZrrJ7lQt7QP3AL7Z5/q9QQBEURxQjhz+IpTMsZepiwCi+o/YZxC9wYeST7mulH5Q82gUx+RfJpg==","signatures":[{"sig":"MEUCIQD8gwdxue2pqDB336611jX97Z5LhvSkyvcsDvv/yAXZoQIgGi9qYoPW3sDXKAPKlNJQI+njwOh1Ke7vvy8P9/oRJl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47642},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","gitHead":"c3b6b8a8954271927e38b33dde1c9ed3d969f949","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0-canary.13.c3b6b8a.0_1690194062049_0.007630727189138042","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@storybook/testing-vue3","version":"1.0.0","keywords":["storybook-addons","style","test"],"author":{"name":"yannbf@gmail.com"},"license":"MIT","_id":"@storybook/testing-vue3@1.0.0","maintainers":[{"name":"thafryer","email":"jarelfryer@gmail.com"},{"name":"shaunlloyd","email":"shaunlloydmedia@gmail.com"},{"name":"kylegach","email":"kyle.gach@gmail.com"},{"name":"tooppaaa","email":"clementdungler@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"danielduan","email":"dduan@yahoo.com"},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":"tom@thesnail.org"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"domyen","email":"dom@hichroma.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"pago","email":"patrick.gotthardt@trivago.com"},{"name":"dandean","email":"me@dandean.com"},{"name":"codebyalex","email":"wilsonc.alexander@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"dannyhw","email":"danny.h.williams@hotmail.com"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"rvasikarla","email":"vasikarla.raj@gmail.com"},{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"lshadler","email":"lshadler13@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"darleendenno","email":"darleendenno@gmail.com"}],"homepage":"https://github.com/storybookjs/testing-vue3#readme","bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"dist":{"shasum":"cd2aafcd4e7669654a227d89e994942107c88be6","tarball":"https://registry.npmjs.org/@storybook/testing-vue3/-/testing-vue3-1.0.0.tgz","fileCount":16,"integrity":"sha512-EGHj7NTyaKGFtnBwHrsB/mYjOI/vrvewILjalYSFrm/GW65o4m1OuKuUn5ocbz97NA7/9FWq223TyAZjaCx3bQ==","signatures":[{"sig":"MEUCIEn5q3F+G4cPMd1EWVWYVurIvsZ4yfhNZ/mvV7RhkTlHAiEAroll3udoLnE8gryeghVnoogWe16m4PYWwGUKdjBAP3k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47622},"main":"dist/index.js","module":"dist/testing-vue3.esm.js","gitHead":"8f976fd601fcc5e11ba28e463d00374ee966ac5a","scripts":{"lint":"tsdx lint","size":"size-limit","test":"yarn build && cd ./example && yarn test","build":"tsdx build","start":"tsdx watch","analyze":"size-limit --why","prepare":"tsdx build","release":"yarn build && auto shipit"},"typings":"dist/index.d.ts","_npmUser":{"name":"yannbf","email":"yannbf@gmail.com"},"deprecated":"This package is deprecated as its functionality has been built into @storybook/vue3 in version 8. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#composed-vue-stories-are-now-components-instead-of-functions","repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"_npmVersion":"8.19.4","description":"Testing utilities that allow you to reuse your stories in your unit tests","directories":{},"resolutions":{"**/typescript":"^4.2.3"},"_nodeVersion":"16.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.0.0","auto":"^10.20.4","tsdx":"^0.14.1","husky":"^5.1.3","tslib":"^2.1.0","vitest":"^0.33.0","size-limit":"^4.10.1","typescript":"^4.9.0","concurrently":"^6.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0","@size-limit/preset-small-lib":"^4.10.1"},"peerDependencies":{"vue":"^3.0.0","@storybook/vue3":"^7.0.0","@storybook/types":"^7.0.0","@storybook/preview-api":"^7.0.0","@storybook/client-logger":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/testing-vue3_1.0.0_1690199842247_0.17352068520234631","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-05-25T21:29:54.167Z","modified":"2024-11-20T14:10:12.510Z","0.0.1":"2021-05-25T21:29:54.675Z","0.0.2":"2022-02-03T15:10:28.587Z","0.0.3-canary.54c9d3b.0":"2023-07-07T09:32:33.304Z","0.0.3-canary.d106089.0":"2023-07-07T09:36:16.026Z","1.0.0-canary.13.922565e.0":"2023-07-07T09:40:08.129Z","1.0.0-canary.13.08676b5.0":"2023-07-07T09:48:26.477Z","1.0.0-canary.13.cf0d543.0":"2023-07-07T09:51:35.299Z","1.0.0-canary.13.cce520c.0":"2023-07-07T20:49:18.381Z","1.0.0-canary.13.c9f67c9.0":"2023-07-19T21:40:58.537Z","0.0.3-canary.9529a78.0":"2023-07-23T10:23:45.466Z","1.0.0-canary.13.701b12d.0":"2023-07-23T15:13:52.027Z","1.0.0-canary.13.97b6ad4.0":"2023-07-23T15:16:48.747Z","1.0.0-canary.13.5d50275.0":"2023-07-23T15:21:20.099Z","1.0.0-canary.13.54193a7.0":"2023-07-23T15:27:30.361Z","1.0.0-canary.13.7690fa2.0":"2023-07-23T18:51:44.275Z","1.0.0-canary.13.c3b6b8a.0":"2023-07-24T10:21:02.248Z","1.0.0":"2023-07-24T11:57:22.457Z"},"bugs":{"url":"https://github.com/storybookjs/testing-vue3/issues"},"author":{"name":"yannbf@gmail.com"},"license":"MIT","homepage":"https://github.com/storybookjs/testing-vue3#readme","keywords":["storybook-addons","style","test"],"repository":{"url":"git+https://github.com/storybookjs/testing-vue3.git","type":"git"},"description":"Testing utilities that allow you to reuse your stories in your unit tests","maintainers":[{"email":"storybookbot@gmail.com","name":"storybook-bot"},{"email":"dom@hichroma.com","name":"domyen"},{"email":"kasperpeulen@gmail.com","name":"kasperpeulen"},{"email":"dev@valentinpalkovic.dev","name":"valentinpalkovic"},{"email":"jeppe@reinhold.is","name":"jreinhold"},{"email":"kyle.gach@gmail.com","name":"kylegach"},{"email":"ndelangen@me.com","name":"ndelangen"},{"email":"shilman@gmail.com","name":"shilman"},{"email":"tom@thesnail.org","name":"tmeasday"},{"email":"gert@chromatic.com","name":"ghengeveld"},{"email":"varunvachhar@gmail.com","name":"winkervsbecks"},{"email":"yannbf@gmail.com","name":"yannbf"}],"readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/1671563/119191947-9ba7a400-ba7f-11eb-8658-2b7056f1cd12.png\" alt=\"Storybook Testing Vue3\" width=\"100\" />\n</p>\n\n<p align=\"center\">Testing utilities that allow you to reuse your Vue 3 stories in your unit tests</p>\n\n<br/>\n\n> ⚠️ This library is for **Vue 3** projects. If you're using Storybook with **Vue 2**, please check [@storybook/testing-vue](https://github.com/storybookjs/testing-vue) instead!\n\n\n## Installation\n\nThis library should be installed as one of your project's `devDependencies`:\n\nvia [npm](https://www.npmjs.com/)\n\n```\nnpm install --save-dev @storybook/testing-vue3\n```\n\nor via [yarn](https://classic.yarnpkg.com/)\n\n```\nyarn add --dev @storybook/testing-vue3\n```\n\n## Setup\n\n### Storybook CSF\n\nThis library requires you to be using Storybook's [Component Story Format (CSF)](https://storybook.js.org/docs/vue/api/csf) and [hoisted CSF annotations](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations), which is the recommended way to write stories since Storybook 7.\n\nEssentially, if your stories look similar to this, you're good to go!\n\n```jsx\n// CSF: default export (meta) + named exports (stories)\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nexport const Primary = {\n  template: '<Button v-bind=\"args\" />',\n};\n```\n\n### Global config\n\n> This is an optional step. If you don't have [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), there's no need to do this. However, if you do, this is a necessary step for your global decorators to be applied.\n\nIf you have global decorators/parameters/etc and want them applied to your stories when testing them, you first need to set this up. You can do this by adding to or creating a jest [setup file](https://jestjs.io/docs/configuration#setupfiles-array):\n\n```tsx\n// setupFile.js <-- this will run before the tests in jest.\nimport { setProjectAnnotations } from '@storybook/testing-vue3';\nimport * as globalStorybookConfig from './.storybook/preview'; // path of your preview.js file\n\nsetProjectAnnotations(globalStorybookConfig);\n```\n\nFor the setup file to be picked up, you need to pass it as an option to jest in your test command:\n\n```json\n// package.json\n{\n  \"test\": \"jest --setupFiles ./setupFile.js\"\n}\n```\n\n## Usage\n\n### `composeStories`\n\n`composeStories` will process all stories from the component you specify, compose args/decorators in all of them and return an object containing the composed stories.\n\nIf you use the composed story (e.g. PrimaryButton), the component will render with the args that are passed in the story. However, you are free to pass any props on top of the component, and those props will override the default values passed in the story's args.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStories } from '@storybook/testing-vue3';\nimport * as stories from './Button.stories'; // import all stories from the stories file\n\n// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.\nconst { Primary, Secondary } = composeStories(stories);\n\ntest('renders primary button with default args', () => {\n  render(Primary());\n  const buttonElement = screen.getByText(\n    /Text coming from args in stories file!/i\n  );\n  expect(buttonElement).not.toBeNull();\n});\n\ntest('renders primary button with overriden props', () => {\n  render(Secondary({ label: 'Hello world' })); // you can override props and they will get merged with values from the Story's args\n  const buttonElement = screen.getByText(/Hello world/i);\n  expect(buttonElement).not.toBeNull();\n});\n```\n\n### `composeStory`\n\nYou can use `composeStory` if you wish to apply it for a single story rather than all of your stories. You need to pass the meta (default export) as well.\n\n```tsx\nimport { render, screen } from '@testing-library/vue';\nimport { composeStory } from '@storybook/testing-vue3';\nimport Meta, { Primary as PrimaryStory } from './Button.stories';\n\n// Returns a component that already contain all decorators from story level, meta level and global level.\nconst Primary = composeStory(PrimaryStory, Meta);\n\ntest('onclick handler is called', async () => {\n  const onClickSpy = jest.fn();\n  render(Primary({ onClick: onClickSpy }));\n  const buttonElement = screen.getByRole('button');\n  buttonElement.click();\n  expect(onClickSpy).toHaveBeenCalled();\n});\n```\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}