問題タブ [vue-test-utils]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
179 参照

vuejs2 - How to update attrs to component in unit test?

I have a component like this text-box.vue

using it like

Now the issue is how to write a unit test for text-box.vue so that I can validate if the $attrs is updated, something like

I see there are methods like setData and setProps but how to update $attrs?