| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 63d8632 commit 8338700
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,13 @@ Add tests when: | |||
| 18 | 18 | - Fixing regressions and bugs. | |
| 19 | 19 | - Expanding test coverage. | |
| 20 | 20 | ||
| 21 | + ## Test directory structure | ||
| 22 | + | ||
| 23 | + See [directory structure overview][] for outline of existing test & locations. | ||
| 24 | + When deciding on whether to expand an existing test file or create a new one, | ||
| 25 | + consider going through the files related to the subsystem. | ||
| 26 | + For example, look for `test-streams` when writing a test for `lib/streams.js`. | ||
| 27 | + | ||
| 21 | 28 | ## Test structure | |
| 22 | 29 | ||
| 23 | 30 | Let's analyze this basic test from the Node.js test suite: | |
@@ -376,3 +383,4 @@ will depend on what is being tested if this is required or not. | |||
| 376 | 383 | [all maintained branches]: https://github.com/nodejs/lts | |
| 377 | 384 | [node.green]: http://node.green/ | |
| 378 | 385 | [test fixture]: https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#test-fixtures-using-the-same-data-configuration-for-multiple-tests | |
| 386 | + [directory structure overview]: https://github.com/nodejs/node/blob/master/test/README.md#test-directories | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments