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
We would like to test the side effects in our alarms, but the best way to do it now seems to be sleeping in tests for MAX_ALARM_TIMEOUT (which can slow tests down significantly), or mocking an internal function used in alarm via jest.
Would it be a good idea to expose a similar API to res.waitUntil() (e.g., await res.waitForAlarms()), which optionally accepts an argument to change the alarm interval, so they can be tested instantly?
The text was updated successfully, but these errors were encountered:
We would like to test the side effects in our alarms, but the best way to do it now seems to be sleeping in tests for MAX_ALARM_TIMEOUT (which can slow tests down significantly), or mocking an internal function used in alarm via jest.
Would it be a good idea to expose a similar API to
res.waitUntil()
(e.g.,await res.waitForAlarms()
), which optionally accepts an argument to change the alarm interval, so they can be tested instantly?The text was updated successfully, but these errors were encountered: