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
As mentioned in #1174 (comment). I want to be able to customize the default creation of a stubbed component, when using shallowMount or stubs: { ChildComponent: true }.
This could look something like:
constwrapper=shallowMount(MyComponent,{global: {createStubs: ({ name, component })=>{// Implement own logic to create a stubreturndefineComponent({
name,render: ()=>// Custom render logic})}}})
Unfortunately I was not able to find another way, without manually create a stub for every component. I tried to use transformVNodeArgs by myself but it will be replaced when I do mount.
The text was updated successfully, but these errors were encountered:
As mentioned in #1174 (comment). I want to be able to customize the default creation of a stubbed component, when using
shallowMount
orstubs: { ChildComponent: true }
.This could look something like:
If set the hook would be called once for every component instead of
createStub
.https://github.com/vuejs/vue-test-utils-next/blob/5bfe95cc71f6d07aff576a66bf450e6f23a26a36/src/stubs.ts#L282-L288
Unfortunately I was not able to find another way, without manually create a stub for every component. I tried to use
transformVNodeArgs
by myself but it will be replaced when I domount
.The text was updated successfully, but these errors were encountered: