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

Events #252

Open
szmarczak opened this issue Sep 13, 2019 · 5 comments
Open

Events #252

szmarczak opened this issue Sep 13, 2019 · 5 comments

Comments

@szmarczak
Copy link

It would be nice to have some events:

  • newTimer
  • removeTimer
  • ...

It would for example allow to execute all new timers by:

clock.on('newTimer', () => {
	clock.runAll();
});
@fatso83
Copy link
Contributor

fatso83 commented Oct 9, 2019

That would imply using the async interface, right, so the naming should probably reflect that. Such a trigger would be quite confusing in sync lolex code, I think.

@stale

This comment has been minimized.

@stale stale bot added the stale label Dec 8, 2019
@szmarczak

This comment has been minimized.

@stale stale bot removed the stale label Dec 8, 2019
@SimenB SimenB added the pinned label Dec 8, 2019
@fatso83
Copy link
Contributor

fatso83 commented Dec 9, 2019

@szmarczak This is a nice feature, but from experience, you have a much higher chance of seeing it implemented if you do an attempt yourself and provide a pull request :-) The lolex source code is quite simple, short and easy to get into.

@szmarczak
Copy link
Author

szmarczak commented Dec 9, 2019

Yeah, I'll do when I have more free time. Currently I'm focused on HTTP/2 support for Got.

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

No branches or pull requests

3 participants