Describe the bug
I was trying to follow the tutorial from https://www.learnstorybook.com/angular/en/simple-component/ but got a lot of trouble (the doc for jest-preset-angular is not up to date and hard to find the right way).
I'm stuck with last step, I think I configured everything up but when I run the jest test angularshots.test.ts fail. it look like it's the import 'global' which doesn't work properly from addon-storyshots/dist/api/index.js.
To Reproduce
Steps to reproduce the behavior:
I personally use Intellij IDEA built-in Jest runner which is more visual (screenshot come from it)
Expected behavior
The test should run like for the v3 version of the repo
Screenshots
v5

v3

System:
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
I got the same problem with
TypeError: Cannot read property 'get' of undefined
> 1 | import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';
| ^
2 |
3 | initStoryshots({
4 | test: multiSnapshotWithOptions({}),
at _interopRequireWildcard (node_modules/@storybook/addon-storyshots/dist/api/index.js:22:331)
at Object.<anonymous> (node_modules/@storybook/addon-storyshots/dist/api/index.js:8:15)
at Object.<anonymous> (node_modules/@storybook/addon-storyshots/dist/index.js:52:35)
at Object.<anonymous> (src/storyshots.test.ts:1:1)
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Up (to not get closed again for nothing...)
Hi, I have the same problem. Did you solve it?
@smikolajewicz , no it's style waiting to be resolved
Hi, I'm also having the same issue. Did anyone find a solution yet?
@AkshayRana92 @rfreydi any luck setting it up? Getting the same exact error and can't figure out why :|
Hi, same issue on my side (Angular 8.2.12 & Storybook 5.2.5).
+1 about the fact that the tutorial would require a refresh to fit with current jest-preset-angular version.
I can reproduce in in master but not in next. Still have to find out what fixed it
UPD: seems fixed in babel with https://github.com/babel/babel/pull/10161. I'll update corresponding dependencies in master
I seem to be getting this in 5.2.6 馃槦
@shilman https://github.com/storybookjs/storybook/pull/8776 is yet unreleased, right?
Hmm, running this on Node 10 (matching our build server) this issue goes away, but on my new laptop (with Node 13.2.0) it fails 馃し鈥嶁檪
Yes, it's an issue specific to newer Node versions
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
This is now resolved as of 5.3.3
awesome! closing!
This is now resolved as of
5.3.3
No i installed a fresh copy from create react app and then storybook with npx -p @storybook/cli sb init --type react_scripts
. But still getting the same error
@arun678 this is an angular issue?
@arun678 this is an angular issue?
No, it's react. But have encountered same error.
Most helpful comment
I got the same problem with