You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method Vue#$emit accepts the name of the event an any number of the parameters that all being sent to the function - event handler.
But in test BaseWrapper.prototype.trigger accepts only one parameter after the event name.
If you'd like to activate a custom event, how about:
wrapper.vm.$emit('customEvent', 1, 2, 3)
That will work!
No, it does not. I have a component "my-component", that emits a custom event "my_signal". Please write a test for the parent component using jest that function my_signal is called with 2 parameters when my-component emits the signal.
Subject of the issue
The method
Vue#$emit
accepts the name of the event an any number of the parameters that all being sent to the function - event handler.But in test
BaseWrapper.prototype.trigger
accepts only one parameter after the event name.Steps to reproduce
in the code:
in the test:
Expected behaviour
it should be printed
[1, 2]
Actual behaviour
it is printed [1]
Possible Solution
I think it is quite clear, there must be implemented the transfer of more than one argument.
The text was updated successfully, but these errors were encountered: