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
Should we also add a --delay argument to the CLI that would apply to all endpoints?
In my experience it tends to be a couple of specific endpoints that are notably slow. But I'm sure someone's going to look for a command line argument. Give the people what they want?
I'd say adding it to $ is sufficient rather than delaying the entire thing. If we want to test an overall delay in the browser we can use the DevTools in Chrome (or whatever) to throttle everything.
It would be nice to have a function that simulates lag.
It's a matter of adding a function to the return value of the the endpoint function in
src/server/resgistry.ts
For type safety, the new property would need to be added to the
RequestData
type of the same file.Extra credit
delay(1000, 4000)
will create a random delay between 1 and 4 seconds.await
before$.delay(...)
.The text was updated successfully, but these errors were encountered: