You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Vue 2.4 inheritAttrs has been added and I'm trying to figure out how to get tests to make sure that it works correctly. Here is a simple example of what I'm trying to do:
Great, now attributes not listed as props go to the input as expected when I use it.
Is there any way to actually add other attributes in the mount function to test it? That way if v-bind="$attrs" somehow gets messed up the tests will fail so we know about it.
constwrapper=mount(inputComp,{propsData: {label: 'Label Test',id: 'input1',name: 'inputName',// doesn't work here},
attrs{}// something like this?});// Can I set it like this somehow?wrapper.vm.$attrs.name='inputName';
Any help would be appreciated
The text was updated successfully, but these errors were encountered:
Seems to be mostly working. It would be nice if it worked like the domProps and attrs in the render function data object. But I don't know how hard/possible that is for you.
With Vue 2.4 inheritAttrs has been added and I'm trying to figure out how to get tests to make sure that it works correctly. Here is a simple example of what I'm trying to do:
Component template:
Great, now attributes not listed as props go to the input as expected when I use it.
Is there any way to actually add other attributes in the mount function to test it? That way if v-bind="$attrs" somehow gets messed up the tests will fail so we know about it.
Any help would be appreciated
The text was updated successfully, but these errors were encountered: