vue-jest
vue-jest copied to clipboard
stubbed child doesn't emit event when root
<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?
Can you please post a full reproduction in a GitHub repo