You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #467@swenzel-arc added the support for the timers module in NodeJS. Node also exports a non-callback async/Promise version of that API that needs to be mocked. We can probably very easily piggy-pack on top of the existing work done in the referenced PR.
Unfortunately jest cannot currently handle mocking setTimeout from
"node:timers/promises", see issue
sinonjs/fake-timers#469 .
We do not wish to mix callbacks and async functions. To keep our code
testable with jest, let's create our own cancellable wrapper around the
callback-based setTimeout.
haphut
added a commit
to HSLdevcom/transitdata-partial-apc-expander-combiner
that referenced
this issue
Dec 13, 2023
Unfortunately jest cannot currently handle mocking setTimeout from
"node:timers/promises", see issue
sinonjs/fake-timers#469 .
We do not wish to mix callbacks and async functions. To keep our code
testable with jest, let's create our own cancellable wrapper around the
callback-based setTimeout.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In #467 @swenzel-arc added the support for the
timers
module in NodeJS. Node also exports a non-callback async/Promise version of that API that needs to be mocked. We can probably very easily piggy-pack on top of the existing work done in the referenced PR.Also see the over-arching #418
The text was updated successfully, but these errors were encountered: