Closed budet-b closed 2 years ago
Or do you know how can I mock this module with Jest ? I've try something like:
jest.mock('storybook-vue3-router');
import vueRouter from 'storybook-vue3-router';
const mockedDependency = vueRouter as jest.Mocked<typeof vueRouter>;
export default mockedDependency;
and reference it in jest.config but with no result.
Do you have an idea @NickMcBurney ?
For the initial you mentioned, you could try using require rather than import.
I'm not sure why you would want to use this package within a jest test, it's specifically built for Storybook not jest and won't work outside of Storybook - you probably ne next importing full vue-router for this.
@budet-b, would it be possible for you to provide a small reproduction repo? If you can I'd be happy to investigate for you.
Closing as stale.
I have a story with a vueRouter mocked with custom routes like this:
And I declare my template like this:
When I start storybook it works well as expected but I need to create some storyshots I have the following:
Did I miss something in the configuration ?