Closed
Description
Hi Folk,
The unit test example here doesn't work out of the box with either the browserify or webpack templates.
https://vuejs.org/v2/guide/unit-testing.html#Writing-Testable-Components
The container needs to be passed in with the propsData or they are not used
function getRenderedText (Component, propsData) {
const container = document.createElement('div');
const Ctor = Vue.extend(Component);
const vm = new Ctor({
el: container,
propsData: propsData
});
return vm.$el.textContent
}
if you want a repository to look at it easily it is here
Thanks for all you are doing. It's making being a js developer more pleasant than it was by far.