Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storybook-vue3-router throws an error in storybook #29

Open
jinmayamashita opened this issue Dec 16, 2022 · 0 comments
Open

storybook-vue3-router throws an error in storybook #29

jinmayamashita opened this issue Dec 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@jinmayamashita
Copy link
Collaborator

jinmayamashita commented Dec 16, 2022

The test fails with the following error.

yarn run v1.22.19
$ test-storybook -c _storybook
 PASS   browser: chromium  src/components/ImageLoader/ImageLoader.stories.tsx
 PASS   browser: chromium  src/views/NotFound/NotFound.stories.tsx
 PASS   browser: chromium  src/views/Login/Login.stories.tsx
 PASS   browser: chromium  src/components/User/User.stories.tsx
 PASS   browser: chromium  src/views/Main/Users/Users.stories.tsx
 PASS   browser: chromium  src/views/Main/Home/Home.stories.tsx
 PASS   browser: chromium  src/components/Footer/Footer.stories.tsx
 PASS   browser: chromium  src/components/Header/Header.stories.tsx
 FAIL   browser: chromium  _storybook/stories/flows/LoginFlow.stories.tsx (11.135 s)
  ● User flows/Log in › Submit › play-test

    TypeError: Cannot read properties of undefined (reading 'push')

      at http:/localhost:6006/src/views/Login/Login.vue:18:18

const router = useRouter();

For some reason, only the storybook has the router is undefined, but that seems to be the cause.

FYI @yannde

@jinmayamashita jinmayamashita added the bug Something isn't working label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant