-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Ensure if a docs render is torndown during preparation, it throws #19071
Ensure if a docs render is torndown during preparation, it throws #19071
Conversation
Implementing #17599 for DocsRenderrs
…-vite-storybook-crashes-when
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.
Mostly LGTM. I'm not sure what's going on with those jest changes tho
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!
NOTE: CI is failing because this is based on an old version of next
and we removed one of the templates due to test flake. Might revisit the implementation of that, but I think this run is OK for now.
@@ -1,5 +1,5 @@ | |||
/// <reference types="@types/jest" />; | |||
|
|||
import { jest, jest as mockJest, it, describe, beforeEach, afterEach, expect } from '@jest/globals'; |
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.
do we need this?
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.
Strictly no, but I prefer it, rather than having global symbols available.
Issue: #19015
Implementing #17599 for DocsRenders
What I did
Basically mirrored the behaviour of a story render in a docs render. The contract is, if you call
render.prepare()
and thenrender.teardown()
before it's done, the prepare should reject with aPREPARE_ABORTED
.How to test
XRender.test.ts
PreviewWeb.test.ts
react-vite/default-js
sandbox and browser to http://localhost:6006. Previously it would error about 50% of the time on my machine.