Skip to content
9 changes: 9 additions & 0 deletions doc/guides/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ Add tests when:
- Fixing regressions and bugs.
- Expanding test coverage.

## Test directory structure
See the test [directory structure overview](https://github.com/nodejs/node/blob/master/test/README.md)
Copy link
Member

Choose a reason for hiding this comment

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

Since this is longer than 80 characters, please move the reference down to the end of the file and only keep [directory structure overview][].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes made.

Copy link
Member

Choose a reason for hiding this comment

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

Adding a new line after the header would be good for consistency as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes made.

for an outline of existing test types and their locations.
When deciding on whether to expand an existing test file or create a new one,
consider going through the files related to the subsystem.
For example, take a look at tests starting with "test-streams"
when writing tests for `lib/streams.js`
Copy link
Member

Choose a reason for hiding this comment

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

The line breaks in this paragraph are actually not visible when viewing this not in raw form. Therefore it would be good to wrap each line around 80 characters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes made.



Copy link
Member

Choose a reason for hiding this comment

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

Please keep this consistent with the other places in the doc and only use a single new line :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes made.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, this does not seem to be addressed?

## Test structure

Let's analyze this basic test from the Node.js test suite:
Expand Down