From 481c5f930eb551c81d15c7a0a4417b3af71767e5 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Fri, 16 Feb 2018 00:01:52 +0530 Subject: [PATCH 01/11] Adding where does test go section in writing-test.md --- doc/guides/writing-tests.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 949aea402db5c8..3bbe0acc063520 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -18,6 +18,13 @@ 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 exist 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 structure Let's analyze this basic test from the Node.js test suite: From dd902a03a9601e7dd2b4d899e872a206f60f0550 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Fri, 16 Feb 2018 01:28:30 +0530 Subject: [PATCH 02/11] Typo fix --- doc/guides/writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 3bbe0acc063520..7e5a7bd160465a 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -20,7 +20,7 @@ Add tests when: ## 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 exist then +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 From c1c8eb56734c4b6aa37c6eeb607be1e6c50c0a31 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Fri, 16 Feb 2018 02:39:21 +0530 Subject: [PATCH 03/11] Typo fix --- doc/guides/writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 7e5a7bd160465a..aa93b0bb6cb12a 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -22,7 +22,7 @@ Add tests when: 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 +and search for similar APIs and see if there is similar file available. ## Test structure From 5bf8d98a99330e18ada30567b09299cc2386a6c3 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Fri, 16 Feb 2018 03:19:01 +0530 Subject: [PATCH 04/11] reframing content and topic of section --- doc/guides/writing-tests.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index aa93b0bb6cb12a..d7f3fa4519a676 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -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) +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`) +and assessing whether a related test already exists. ## Test structure From ca0448b83ea05d302448d6d851281a3e320c3bd7 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Sat, 17 Feb 2018 14:09:58 +0530 Subject: [PATCH 05/11] Fixes: https://github.com/nodejs/node/issues/18774 --- doc/guides/writing-tests.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index d7f3fa4519a676..7983cd49258df2 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -22,8 +22,10 @@ Add tests when: See the test [directory structure overview](https://github.com/nodejs/node/blob/master/test/README.md) 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`) -and assessing whether a related test already exists. +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` + ## Test structure From 2dea00a90798523e7a3a3fcb2a25dd73266a90c0 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Tue, 20 Feb 2018 00:21:20 +0530 Subject: [PATCH 06/11] Restructuring the description --- doc/guides/writing-tests.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 7983cd49258df2..a5aab46ec01566 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -19,12 +19,11 @@ Add tests when: - Expanding test coverage. ## Test directory structure -See the test [directory structure overview](https://github.com/nodejs/node/blob/master/test/README.md) -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` + +See the test [directory structure overview][] 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 looking at tests starting with `test-streams` when writing tests for `lib/streams.js` ## Test structure @@ -390,3 +389,4 @@ will depend on what is being tested if this is required or not. [all maintained branches]: https://github.com/nodejs/lts [node.green]: http://node.green/ [test fixture]: https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#test-fixtures-using-the-same-data-configuration-for-multiple-tests +[directory structure overview]: https://github.com/nodejs/node/blob/master/test/README.md From ba6513b1b67caec18fd5f2cc4e2e808ef8cb6b24 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Thu, 22 Feb 2018 02:58:53 +0530 Subject: [PATCH 07/11] Wrapping line in 80 characters --- doc/guides/writing-tests.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index a5aab46ec01566..bdd2f523de5f2d 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -20,11 +20,10 @@ Add tests when: ## Test directory structure -See the test [directory structure overview][] for an outline of existing test types and their locations. +See [directory structure overview][] for outline of existing test & 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 looking at tests starting with `test-streams` when writing tests for `lib/streams.js` - +For example viewing tests for `test-streams` when writing for `lib/streams.js`. ## Test structure From b24c938a98b857b5b20ea62a6878a54cc848a262 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Fri, 23 Feb 2018 01:06:01 +0530 Subject: [PATCH 08/11] Typo fixes --- doc/guides/writing-tests.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index bdd2f523de5f2d..60c1c221ca5cd6 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -20,9 +20,9 @@ Add tests when: ## Test directory structure -See [directory structure overview][] for outline of existing test & 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. +See [directory structure overview][] for outline of existing test & 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 viewing tests for `test-streams` when writing for `lib/streams.js`. ## Test structure From 0fa4c3a9843bdad7e776f5bdc312359ca551cf3e Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Thu, 1 Mar 2018 13:10:34 +0530 Subject: [PATCH 09/11] refactoring content --- doc/guides/writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 60c1c221ca5cd6..b64dd85f1378d4 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -23,7 +23,7 @@ Add tests when: See [directory structure overview][] for outline of existing test & 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 viewing tests for `test-streams` when writing for `lib/streams.js`. +For example viewing tests for `test-streams` when writing a test for `lib/streams.js`. ## Test structure From c8696dfb40852e31f1ae91e91c0870850f7b0484 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Sat, 3 Mar 2018 02:21:12 +0530 Subject: [PATCH 10/11] wrapping in 80 char --- doc/guides/writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index b64dd85f1378d4..ab83a507d323f6 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -23,7 +23,7 @@ Add tests when: See [directory structure overview][] for outline of existing test & 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 viewing tests for `test-streams` when writing a test for `lib/streams.js`. +For example, look for `test-streams` when writing a test for `lib/streams.js`. ## Test structure From fc0c5b45ac9c7737cff176d4545aec23e567a4d2 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Thu, 8 Mar 2018 02:00:38 +0530 Subject: [PATCH 11/11] doc: adding test directory structure --- doc/guides/writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index ab83a507d323f6..35b9f197702752 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -388,4 +388,4 @@ will depend on what is being tested if this is required or not. [all maintained branches]: https://github.com/nodejs/lts [node.green]: http://node.green/ [test fixture]: https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#test-fixtures-using-the-same-data-configuration-for-multiple-tests -[directory structure overview]: https://github.com/nodejs/node/blob/master/test/README.md +[directory structure overview]: https://github.com/nodejs/node/blob/master/test/README.md#test-directories