-
Notifications
You must be signed in to change notification settings - Fork 9
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
Separate storyshots #155
Separate storyshots #155
Conversation
getSnapshotFileName, | ||
} from '@storybook/addon-storyshots'; | ||
import renderer from 'react-test-renderer'; | ||
import 'jest-styled-components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This library is not working as I expect. Do you know why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am checking the problem XD
Btw, this plugins quite useful in my project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, i can't find the problem why it is not working...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is related to this. I got some warning about multiple instances of styled-components
when I open storybook. It's not a new issue though.
https://github.com/styled-components/jest-styled-components#working-with-multiple-packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I found that there has only one version of styled-components (in native and web packages), are any 3rd party libraries also using the styled-components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Sorry I forget to mention about that.
I have included my own priority nav https://github.com/ericyip/react-priority-navigation
I tried to avoid bundle with sc
but it's not working..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should separate them XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally got this one working
Add custom serializer in order to work with multiSnapShot
storybookjs/storybook#887 (comment)
@@ -0,0 +1,3 @@ | |||
{ | |||
"extends": "../../../.babelrc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it will be loaded as default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately, not 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, Storybook loads your root
.babelrc
file and load those configurations.
https://storybook.js.org/configurations/custom-babel-config/
But it only reads the "root" of web/
workspace, if the babelrc is out of its scope, it wont be loaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another question, why you moved .babelrc
to the root since #144?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shhh.. I thought it is duplicated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks CJ! =D
fd3ded5
to
bba80ea
Compare
.editorconfig
to maintain consistent coding styles between different editors.