storybookjs / testing-vue

MIT License
10 stars 6 forks source link

fix: replace addons default export with named export #9

Closed Hanawa02 closed 1 year ago

Hanawa02 commented 1 year ago

This PR replaces the default export with the named export for addons.

Context

While migrating a Vue2 Component library from Storybook 6 to 7, the following error was returned:

TypeError: addons__default.setChannel is not a function from the @storybook/testing-vue package. 

While searching a bit for the issue I found this explanation: https://github.com/storybookjs/storybook/issues/20971

yannbf commented 1 year ago

Thank you so much for your contribution @Hanawa02! I believe there might be more work to get this library to be Storybook 7 compatible though, but this is a good first step!

Hanawa02 commented 1 year ago

@yannbf I'm having another issue after this update:

Cannot find module '@storybook/client-api' from 'node_modules/@storybook/testing-vue/dist/testing-vue.cjs.development.js'

Do you mind giving me some pointers so I can try to get this package working with Storybook 7?

Hanawa02 commented 1 year ago

@yannbf I actually had a missing peer dependency 🙈 It's working fine now 😁 If you think that upgrading this repo to storybook 7 is something a beginner contributor can do, then I'm up for the challenge!

yannbf commented 1 year ago

Hey @Hanawa02 that's fantastic! There is an ongoing PR for that at the moment, in case you'd like to take a look at: https://github.com/storybookjs/testing-vue3/pull/12