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

Adding where does test go section in writing-test.md #18802

Closed
Prev Previous commit
Next Next commit
reframing content and topic of section
  • Loading branch information
juggernaut451 committed Feb 15, 2018
commit 5bf8d98a99330e18ada30567b09299cc2386a6c3
12 changes: 6 additions & 6 deletions doc/guides/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Add tests when:
- Fixing regressions and bugs.
- Expanding test coverage.

## Where does the test go
One can refer [test directory structure](https://github.com/nodejs/node/tree/master/test)
to decide where to put your test cases. If you want to find any current test that exists then
go to the defined [test directory structure](https://github.com/nodejs/node/tree/master/test)
and search for similar APIs and see if there is similar file available.

## 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 (e.g. ones starting with "test-streams" 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.

Nit: can you wrap this to 80-chars? Also maybe ones starting with `test-streams-` for `lib/streams.js`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixing it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joyeecheung fixed. Kindly have a look

and assessing whether a related test already exists.

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

Expand Down