-
Notifications
You must be signed in to change notification settings - Fork 668
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
renderToString cannot work properly #916
Labels
Comments
Yes, we should fix this. What do you think about handling it through the const str = renderToString(TestComponent)
const str = await renderToString(TestComponent, {
sync: false
}) |
sound good to me. 👍 |
Do you have an example component that won't won't render correctly? |
Sorry for my late reply. |
Same error when the component content is too large to execute. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
1.0.0-beta.24
Reproduction link
https://github.com/kazupon/vue-i18n-extensions/tree/moving
Steps to reproduce
git clone [email protected]:kazupon/vue-i18n-extensions.git
cd vue-i18n-extensions
git branch moving origin/moving
git checkout moving
yarn
yarn test:unit
What is expected?
pass the test in
src/__tests__/repro.test.js
What is actually happening?
cannot pass the test in
src/__tests__/repro.test.js
:I notice
renderToString
have the critical issue.See the bellow:
https://github.com/vuejs/vue-test-utils/blob/dev/packages/server-test-utils/src/renderToString.js#L40-L46
renderedString
cannot return the correctly string, depending on the implementation of the component.Vue SSR docs have been saying
renderToString
(vue-server-renderer) return the Promise.https://ssr.vuejs.org/api/#renderer-rendertostring
I think
renderToStrnig
API should be re-designed.I propose the below the API.
renderToString
: return the PromiserenderToString
: provide the callback argumentThe text was updated successfully, but these errors were encountered: