How to trigger an event in stub? [vue-test-utils]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
6
2
I'm trying to test a component event like this: // template: <form @submit.prevent="save"></form> const save = jest.fn() const wrapper = mount(MyComponent, {methods: { save }}) wrapper.find('form').trigger('submit.prevent') expect(save).toBeCalled() // Called successfully Where the event calls a component method. It works very well But if i use a custom component, the component method isn't called // template: <my-custom-form @submit="save"></my-custom-form> const save = jest.fn() const wrapper = mount(MyComponent, {methods: { save }, stubs: ['...