Test Clocks ​
A test clock enables deterministic control over objects in testmode. With a test clock, you can create objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
Endpoints ​
Create a test clock ​
- POST /v1/test_helpers/test_clocks
Retrieve a test clock ​
- GET /v1/test_helpers/test_clocks/:id
List all test clocks ​
- GET /v1/test_helpers/test_clocks
Delete a test clock ​
- DELETE /v1/test_helpers/test_clocks/:id
Advance a test clock ​
- POST /v1/test_helpers/test_clocks/:id/advance
Events ​
test_helpers.test_clock.advancingOccurs whenever a test clock starts advancing.test_helpers.test_clock.createdOccurs whenever a test clock is created.test_helpers.test_clock.deletedOccurs whenever a test clock is deleted.test_helpers.test_clock.internal_failureOccurs whenever a test clock fails to advance its frozen time.test_helpers.test_clock.readyOccurs whenever a test clock transitions to a ready status.