Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to test emited method from child component vue js

<template>
  <div>
    <child-component ref="childRef" @custom="handleMethod" />
  </div>
</template>

const wrapper = mount(Component);
wrapper.vm.$refs.childRef.$emit('custom');
Source by forum.vuejs.org #
 
PREVIOUS NEXT
Tagged: #test #emited #method #child #component #vue #js
ADD COMMENT
Topic
Name
9+4 =