-
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
Add support for HTML templates #351
Comments
Is this something that's going to be included? Testing seems to steer the way we're write code in other contexts. Developers steering away from HTML templates and towards using a main App component is common from what I can tell. It doesn't really seem to create that much more work either. |
I thought it would be a nice-to-have. You're right, we should encourage users to use templates in components, rather than HTML templates. But HTML templates make Vue more accessible for users, and the ability to drop vue-test-utils into a codepen of a Vue instance with an HTML template might make testing more approachable to some users. |
My 2 cents is that if this is to be the official testing library of Vue, it should support all features of Vue (or at least the main ones, of which HTML templates and single file components are in my opinion). |
What is the work around for this? Do we have to completely refactor our html templates into a template property? Why is there documentation on testing single file components if it isn't fully supported? |
Having waded through mud to try to test Vue components only to hit this issue with $refs I feel rather deflated to find I have to refactor templates into properties to make this work - especially as they do not have the same editor syntax checking that html templates have. |
We recently merged a PR, which allows templates as a reference in the element in the DOM - #1320 |
It's incredible that this is not supported! Any thoughts on implementing it? |
Feature request as suggested in #271 (comment)
Please add support for HTML templates. Main use case is Vue single file components. Example of unsupported use case:
https://jsfiddle.net/h0bnmk5d/1/
And the current work around is to refactor into component
template
property:https://jsfiddle.net/h0bnmk5d/2/
The text was updated successfully, but these errors were encountered: