Skip to content

wrapper.vm.$listeners not equal the actual vueInstance.$listeners #472

Closed
@Hanruis

Description

@Hanruis

Version

1.0.0-beta.12

Reproduction link

https://jsbin.com/nopulunamo/3/edit?html,console,output

Steps to reproduce

  1. create a wrapper by method mount , and pass listeners param

    const wrapper = mount(myComponent, {
       listeners: {
         change: someFunction,
       },
     });
    

What is expected?

 wrapper.vm.$listerners  = {
    change: function invoker(){}
 }

 invoker.fns  ===  someFunction

What is actually happening?

wrapper.vm.$listerners.change === someFunction  

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions