Skip to content
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

fix: EventEmitter.listeners() should not throw on unknown listeners #104

Merged
merged 1 commit into from Jan 18, 2022

Conversation

mxschmitt
Copy link
Contributor

Fixes #103

@jfhbrook
Copy link
Owner

Oh, you got it for me! Cool!

Copy link
Owner

@jfhbrook jfhbrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I'll pull the release levers shortly! Thanks so much!!

@@ -240,6 +240,13 @@ def once_handler():
call_me.assert_not_called()


def test_listeners_does_work_with_unknown_listeners():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even have to ask for a test. Beautiful!

@jfhbrook jfhbrook merged commit 794a201 into jfhbrook:main Jan 18, 2022
@mxschmitt
Copy link
Contributor Author

@jfhbrook thank you! We use it very heavily at Playwright and it works like a charm! 💯

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.

[Regression]: EventEmitter.listeners("foo") throws if no listener exists
2 participants