From 7065708470801e66d23db93661d1e33b8ff92b64 Mon Sep 17 00:00:00 2001 From: dillonstreator Date: Sat, 9 Dec 2023 16:09:12 -0600 Subject: [PATCH] document request abort test more --- src/app.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.test.ts b/src/app.test.ts index cec8c75..0c12715 100644 --- a/src/app.test.ts +++ b/src/app.test.ts @@ -58,7 +58,9 @@ describe('app', () => { } catch (e) {} // allow the server to complete any work that it would have been doing before asserting that fetch did not get called - // this 500ms timeout is brittle as it's directly tied to the simulated work in the endpoint 10 iterations of 25ms + // to see the effects of this test, you could remove the request handlers use of `req.abortSignal` + // + // this 500ms timeout is brittle as it's intended to be larger than the simulated work in the endpoint (10 iterations of 25ms) // given this is just for demonstration purposed, it's fine await new Promise((r) => setTimeout(r, 500));