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
Synchronous dev utilities #13
Closed
andyrichardson opened this issue
Mar 13, 2020
· 3 comments
· Fixed by react-cosmos/react-cosmos#1171
Closed
Synchronous dev utilities #13
andyrichardson opened this issue
Mar 13, 2020
· 3 comments
· Fixed by react-cosmos/react-cosmos#1171
Comments
Quick note unrelated to the issue: I think you want to pass |
You make a solid case. These alternative methods would indeed be useful:
|
Hero!
I'm humbled! This is pretty core to one of our projects so I'll see if I can spend some time on it today. |
This was referenced Mar 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
About
The dev utilities exported from the "react-cosmos" package are great but their async implementation can make basic usage tricky or impossible.
It would be awesome if a sync version of these packages could be provided.
Here's an example of how I'm currently using
getFixtureUrls
. Because the function is async, there's no way to make use of test.each.Another example is a bash script which needs the fixture urls. There's no easy way to get them because something such as this would not work due to the async implementation
URLS=$(node -x "require('react-cosmos').getFixtureUrls()")
Final example, this was a hack I had to do to make a backstop config that uses fixture URLs. Synchronously, I would have just done this:
The text was updated successfully, but these errors were encountered: