-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Core: Add framework
field support to main.js
#16393
Conversation
Nx Cloud ReportCI ran the following commands for commit dc7b2bf. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
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.
Good first step!
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.
LGTM. Should we add a test to PreviewWeb
for the missing renderToDOM
?
projectAnnotations.renderToDOM = undefined; | ||
|
||
document.location.search = '?id=component-one--a'; | ||
const preview = await createAndRenderPreview(); |
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 just split out createAndRenderPreview
in this one case rather than doing the shenanigans with changing projectAnnotations
.
expect(preview.view.showErrorDisplay.mock.calls[0][0]).toMatchInlineSnapshot(` | ||
[Error: Expected 'framework' in your main.js to export 'renderToDOM', but none found. | ||
|
||
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field ] |
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 just doing a match on a portion of the message is better than a snapshot here otherwise we'll be updating it all the time as we tweak the message
Issue: #16296
What I did
framework: x
to CLI for forward-compatibilityHow to test
react-ts
example