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

chore: migrate away from Node's EventEmitter #5979

Merged
merged 12 commits into from Jun 15, 2020
Merged

chore: migrate away from Node's EventEmitter #5979

merged 12 commits into from Jun 15, 2020

Conversation

jackfranklin
Copy link
Collaborator

This PR re-introduces Mitt (that was released in v3.2 and reverted in v3.3).

The majority of EventEmitter methods are re-implemented in Puppeteer and we will release this as a major version accompanied by release notes that document exactly which methods have been removed to help users migrate.

Copy link
Member

@mathiasbynens mathiasbynens left a comment

Choose a reason for hiding this comment

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

LGTM % the TODO you outlined

// Two now because we added the handler back.
expect(handler.callCount).toBe(2);
});
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

a user reported a bug in 3.2 where this code didn't work. I don't think it was a bug in Mitt, but I wanted to add a test that explicitly listened to an event, stopped, and then started again just to make sure. It's a useful test to have IMO.

@jackfranklin jackfranklin force-pushed the mitt-again branch 3 times, most recently from 8cfafee to 410412b Compare June 12, 2020 12:54
@jackfranklin jackfranklin changed the title [WIP] chore: migrate away from Node's EventEmitter chore: migrate away from Node's EventEmitter Jun 15, 2020
@jackfranklin jackfranklin merged commit b659969 into master Jun 15, 2020
@mathiasbynens mathiasbynens deleted the mitt-again branch June 30, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants