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

Use with sinon fake timers #49

Open
Bilb opened this issue May 27, 2021 · 1 comment
Open

Use with sinon fake timers #49

Bilb opened this issue May 27, 2021 · 1 comment

Comments

@Bilb
Copy link

Bilb commented May 27, 2021

Hi,
I would like to know how can I fake the minTimeout of my r-retried function using sinon.fakeTimers or anything equivalent ?
Thanks

@papb
Copy link

papb commented May 27, 2021

I'd guess sinon.useFakeTimers() should just work for what you want, since p-retry uses retry which reads setTimeout and clearTimeout directly from the global scope.

I had the opposite problem recently, read here to know more

Good luck!

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

No branches or pull requests

2 participants