-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Recommended way to shutdown server with image snapshots #2839
Comments
I'm not sure I understand your question. This example shows how to configure image snapshots with the static (exported) instance of Storybook. What do you mean by
|
I was unable to get Should I be doing something like this?
|
Ah, I see. IMO the recommended way is to make it working with the static version. But if you think that for your purposes running an express server is a better solution go for it =) P.S. Maybe @storybooks/team has another opinion. |
I would love the for the static version to work. The static version doesn't serve my CSS and other cross origin issues (fonts, etc). I get stuff like this when running
@igor-dv How do you serve CSS, fonts, etc. in your static |
How do you load/serve your assets in your app? |
We used to use Webpack for Storybook, but Jest choked on the CSS (token not recognized?), so I put the CSS This isn't for a real production application. It's for a React implementation of a Design System. |
I'm going to close this issue. The following works:
|
Unless a maintainer would like a pared down version of this in the readme? |
@interactivellama , did you try to use -s (static assets) parameter with build-storybook command? Also,
I am not sure I understand, why jest is related when you are exporting the static storybook |
I don't know if it's Jest, but I was not aware of the |
Issue details
The readme says to have the server concurrently running with the image snapshot tests. I can start an express server before the tests run, but I don't see any callback API with the
initImageSnapshot
function. What's the recommended way to shut down the server afterwards? ShouldinitImageSnapshot
be wrapped in adescribe
/before/after
structure?I'm willing to pull request to the readme if you can provide me some direction.
Steps to reproduce
Follow the directions in the readme. ;-)
Please specify which version of Storybook and optionally any affected addons that you're running
The text was updated successfully, but these errors were encountered: