vue-jest icon indicating copy to clipboard operation
vue-jest copied to clipboard

stubbed child doesn't emit event when root

Open willkenson opened this issue 6 years ago • 1 comments

<template> <child-component v-on:customevent="customeventhandler"><div>slot content here</div></child-component></template>

(with component shallow mounted in jest) wrapper.find('child-component-stub').vm.$emit('customevent');

the event doesn't fire. however if i wrap the <child-component> in a <div> so it is not the root element, it works fine.

(the events also work fine on the actual page.. just not in jest)

is this a bug?

willkenson avatar Feb 19 '19 23:02 willkenson

Can you please post a full reproduction in a GitHub repo

eddyerburgh avatar Mar 12 '19 18:03 eddyerburgh