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
7 changes: 7 additions & 0 deletions doc/guides/writing-tests.md
Expand Up @@ -18,6 +18,13 @@ Add tests when:
- Fixing regressions and bugs.
- Expanding test coverage.

## Where does the test go
Copy link
Member

Choose a reason for hiding this comment

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

This would sound better as "Where are tests located" (maybe "Where are the..." but that's getting clunky) or even "Test directory structure".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changing it to "Test directory structure"

One can refer [test directory structure](https://github.com/nodejs/node/tree/master/test)
Copy link
Member

Choose a reason for hiding this comment

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

General nit: please keep lines to 80 chars. I think URLs can, maybe, be excepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks 👍

to decide where to put your test cases. If you want to find any current test that exist then
Copy link
Contributor

Choose a reason for hiding this comment

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

exist -> exists

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
Copy link
Contributor

Choose a reason for hiding this comment

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

A nit: missing period.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

did not get this one. Can you please elaborate

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry. I think file available should be file available. (with a dot).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved :)



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