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(node/events): fix getMaxListeners and setMaxListeners to pass native node tests #928

Conversation

uki00a
Copy link
Contributor

@uki00a uki00a commented May 19, 2021

Part of #911

Changes

  • Enabled the following test files:
    • test-event-emitter-max-listeners-warning-for-null.js
    • test-event-emitter-max-listeners-warning-for-symbol.js
    • test-event-emitter-max-listeners-warning.js
    • test-event-emitter-max-listeners.js
  • EventEmitter#setMaxListeners should throw ERR_OUT_OF_RANGE instead of Error
  • EventEmitter#on now emits the warning event when the maximum number of listeners is exceeded

@kt3k
Copy link
Member

kt3k commented May 20, 2021

ci is blocked by denoland/deno#10716, should be fixed soon in main repo

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

@uki00a Thanks! Nice work!

LGTM

Comment on lines +13 to +16
"test-event-emitter-max-listeners-warning-for-null.js",
"test-event-emitter-max-listeners-warning-for-symbol.js",
"test-event-emitter-max-listeners-warning.js",
"test-event-emitter-max-listeners.js",
Copy link
Member

Choose a reason for hiding this comment

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

👏

@kt3k kt3k merged commit 6a111a8 into denoland:main May 24, 2021
@uki00a uki00a deleted the align-getMaxListeners-and-setMaxListeners-to-native-node-tests branch May 24, 2021 17:20
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