Skip to content

Conversation

@epszaw
Copy link

@epszaw epszaw commented May 24, 2021

Hello!
I've already asked for help with custom vue events emitting in #233, but I think, it would be nice to have unified way to fire both DOM and vue events.
I propose to use fireEvent.emit as syntax sugar over the __vue__.$emit method.

Konstantin Epishev added 2 commits May 24, 2021 13:17
@epszaw epszaw changed the title [Feature] fireEvent.emit feat: fireEvent.emit May 24, 2021
@afontcu
Copy link
Member

afontcu commented May 26, 2021

Hi! Thank you for the initiative here.

I think this is already solvable by clicking the button and using emitted() to inspect the result. With this addition, tests would rely on implementation details (the custom event) instead of interacting with the component as a user would.

@epszaw
Copy link
Author

epszaw commented May 26, 2021

Hi! Thank you for the initiative here.

I think this is already solvable by clicking the button and using emitted() to inspect the result. With this addition, tests would rely on implementation details (the custom event) instead of interacting with the component as a user would.

I see, what you mean. I'll try to follow this way and return back, if something goes wrong or I'll have example to continue the discussion.

@epszaw epszaw closed this May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants