Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: fireEvent.emit #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
epszaw wants to merge 2 commits into testing-library:master from epszaw:feat-fire-vue-event
Closed

feat: fireEvent.emit #234

epszaw wants to merge 2 commits into testing-library:master from epszaw:feat-fire-vue-event

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
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.

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.

afontcu reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /