Skip to content

doc: add test reporter event lifecycle diagram - #63780

Open
Han5991 wants to merge 3 commits into
nodejs:mainfrom
Han5991:doc/test-reporter-events-lifecycle
Open

doc: add test reporter event lifecycle diagram#63780
Han5991 wants to merge 3 commits into
nodejs:mainfrom
Han5991:doc/test-reporter-events-lifecycle

Conversation

@Han5991

@Han5991 Han5991 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Adds an "Event lifecycle" section under Class: TestsStream with 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.

image image

Fixes: #51908

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem. labels Jun 7, 2026
Comment thread doc/api/test.md Outdated
@atlowChemi

Copy link
Copy Markdown
Member

Ping @MoLow
You recently fixed some bugs around the order of the events, can you also have a look?

@Gasila5

This comment was marked as spam.

Gasila5

This comment was marked as spam.

@trivikr

trivikr commented Aug 22, 2026

Copy link
Copy Markdown
Member

This needs a rebase to resolve conflicts in doc/api/test.md

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>
@Han5991
Han5991 force-pushed the doc/test-reporter-events-lifecycle branch from bddf765 to 6763fea Compare August 24, 2026 11:24
@Han5991

Han5991 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@atlowChemi

I pushed to resolve the issue, so please approve it again.

@trivikr
trivikr requested a review from atlowChemi August 24, 2026 17:54

@atlowChemi atlowChemi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Han5991 this mostly LGTM. Should this also mention test:interrupted?

The diagram only covered the normal path, ending at test:summary. Add an
INTERRUPTION branch so the abnormal path is covered too: on SIGINT the run
exits before the buffered declaration ordered events are flushed, so neither
the run level finale nor the interrupted tests' own results are emitted.

Signed-off-by: sangwook <rewq5991@gmail.com>
@Han5991

Han5991 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@Han5991 this mostly LGTM. Should this also mention test:interrupted?

It would be good to add that! I've added it.

The lint-js-and-md job hit the 15 minute job execution limit on the
previous push; eslint alone took 11m30s on that runner. Empty commit
to re-run the linters.

Signed-off-by: sangwook <rewq5991@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test reporter events lifecycle diagram to the docs

5 participants