I've got a test that during it's setup process I pass some default props to the component. Then, in the test, I use setProps
to pass more specific data into it. Issue is that both default and new data are nested within same props object named org
and Vue obviously complains that the default is getting overwritten. Is there a way around this?
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "optimisticClearFilters"
Here's an example. When I do this from test, it seems to override all org
keys.
wrapper.setProps( { org: { deptSize: [0, 5] }} );