Skip to content

Conversation

@lraveri
Copy link

@lraveri lraveri commented Jan 28, 2026

The “Expecting tests to fail” section uses it() before the documentation explains that it() is an alias of test().

This reorders the relevant documentation sections so that the describe() / it() aliases are introduced before being used, improving readability for first-time readers.

@nodejs-github-bot
Copy link
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 Jan 28, 2026
Copy link
Member

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

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

I presume this is a cut-paste

@lraveri
Copy link
Author

lraveri commented Jan 28, 2026

I presume this is a cut-paste

yep, it is

@lraveri lraveri force-pushed the doc/reorder-test-doc-sections branch from 48eeed9 to 4c1db7d Compare January 28, 2026 16:58
@lraveri lraveri changed the title docs: move describe/it aliases section before expectFailure doc: move describe/it aliases section before expectFailure Jan 28, 2026
@vassudanagunta
Copy link
Contributor

I think clarity would be better served by keeping all the flag options for test together: skip, todo, expectFailure, only.

IMHO one of the following:

  • change the example for expectFailure to use test instead of it. The consistency with the examples for skip and todo makes it easier to learn.

  • if it and describe are so common that the learner should get used to them, then move the describe/it aliases section to the top. Then examples for other features can use either.

@JakobJingleheimer
Copy link
Member

Let's write a proposal for it (in the nodejs/test_runner repo)

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.

6 participants