Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add test naming information to guide #10584

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 3, 2017

The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc test

@Trott Trott added doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. labels Jan 3, 2017
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. lts-watch-v6.x labels Jan 3, 2017
A test must be a node script that exercises a specific functionality provided
by node and checks that it behaves as expected. It should exit with code `0` on success,
otherwise it will fail. A test will fail if:
Most tests in Node.js core are JavaScript programs that exercise a specific
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Can you say a functionality? I feel like it should be a piece of functionality or just functionality.

otherwise it will fail. A test will fail if:
Most tests in Node.js core are JavaScript programs that exercise a specific
functionality provided by Node.js and check that it behaves as expected. Tests
should exit with code `0` on success. A test will fail if:

- It exits by setting `process.exitCode` to a non-zero number.
- This is most often done by having an assertion throw an uncaught
Copy link
Contributor

Choose a reason for hiding this comment

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

more often or most often?

Copy link
Member

Choose a reason for hiding this comment

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

Most often seems reasonable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I'll just switch to the simpler usually. :-D

more information about what is being tested.

For example, a test for the `beforeExit` event on the `process` object might be
named `test-process-beforeExit.js`. If the test specifically checked that arrow
Copy link
Contributor

Choose a reason for hiding this comment

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

As per #10581 (comment), we may have to discuss this further.

The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.
@Trott
Copy link
Member Author

Trott commented Jan 6, 2017

Nits handled, including camel-casing controversy. PTAL @thefourtheye. Perhaps @sam-github can look it over too.

@Trott
Copy link
Member Author

Trott commented Jan 10, 2017

/ping @thefourtheye Does this look OK to you now?

jasnell pushed a commit that referenced this pull request Jan 10, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: #10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
@jasnell
Copy link
Member

jasnell commented Jan 10, 2017

Landed in eb0df4a

@jasnell jasnell closed this Jan 10, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: nodejs#10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 23, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: nodejs#10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 24, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: nodejs#10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: nodejs#10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Mar 7, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: #10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 7, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: #10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: #10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
The guide for writing tests is missing information on how tests are
named. This adds that information.

There is also some copy-editing done on the first paragraph of the
guide.

PR-URL: #10584
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
@Trott Trott deleted the test-names branch January 13, 2022 22:44
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 Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants