doc: add test reporter event lifecycle diagram#63780
Conversation
Document the lifecycle of node:test reporter events under Class: TestsStream, with an ASCII diagram that distinguishes declaration-order events from their execution-order twins (test:dequeue/test:complete), the leaf vs suite flow, and the run-level finale. Fixes: nodejs#51908 Signed-off-by: sangwook <rewq5991@gmail.com>
|
Review requested:
|
| * `'test:stdout'` and `'test:stderr'` are emitted only when the [`--test`][] | ||
| flag is used, and are not guaranteed to follow declaration order. | ||
| * `'test:interrupted'` is emitted if the run is interrupted by a `SIGINT` | ||
| signal (for example, <kbd>Ctrl</kbd>+<kbd>C</kbd>). |
There was a problem hiding this comment.
Not sure this will work, I recall seeing an issue with anchor tag recently (related to the new parser or something around those lines)
@avivkeller would you know?
There was a problem hiding this comment.
You're right — I checked and the link doesn't resolve (doc-kit slugs the heading to #test, but the ref points at #--test). It follows the existing pattern though — the [--test][] link just above (line 671) already does the same — and the reference still seems useful, so I left it in for now. Looks like the doc-kit anchor issue you mentioned.
|
Ping @MoLow |
This comment was marked as spam.
This comment was marked as spam.
Gasila5
left a comment
There was a problem hiding this comment.
CB1qqYm9vZpdzaLHdY76S3rascQ78S1k2bnQESbuDWhH
Adds an "Event lifecycle" section under
Class: TestsStreamwith an ASCII diagram showing how reporter events relate: declaration-order events vs their execution-order twins (test:dequeue/test:complete), the leaf vs suite flow, and the run-level finale.Fixes: #51908