We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Similar (but slightly different) to #45
Using relative templates but I still have an issue. The templates do get parsed, but I think they're not "interpreted" correctly.
Repro: https://github.com/laggingreflex/repro-vue-jest-template
It works in the browser but running jest it gives this error
> jest Cannot use <template> as component root element because it may contain multiple nodes. FAIL src/test.js ● Test suite failed to run
Taking hint from the error, if I change my App/template.vue from
App/template.vue
<template> <div>App</div> </template>
to just
<div>App</div>
the test passes, but that's not the correct format for template - the app doesn't work in the browser.
The text was updated successfully, but these errors were encountered:
but that's not the correct format for template
Well, the external file that you include should be .html, not .vue
<template src="./template.html">
including another .vue file was never a use case for SFCs.
Sorry, something went wrong.
As @LinusBorg says, external .vue files aren't part of the SFC spec
@eddyerburgh I'm switching to .html files for a fix, but I think vue-jest should consider adding support to .vue external templates
.html
.vue
vue-template-compiler
vue-jest
No branches or pull requests
Similar (but slightly different) to #45
Using relative templates but I still have an issue. The templates do get parsed, but I think they're not "interpreted" correctly.
Repro: https://github.com/laggingreflex/repro-vue-jest-template
It works in the browser but running jest it gives this error
Taking hint from the error, if I change my
App/template.vue
fromto just
the test passes, but that's not the correct format for template - the app doesn't work in the browser.
The text was updated successfully, but these errors were encountered: