summaryrefslogtreecommitdiff
path: root/doc/guides/writing-tests.md
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-07-20 21:01:51 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-07-23 22:10:59 +0300
commit4d1e0862ced8134b1b4e57480bbd46ca14e61d0f (patch)
treed2b4c7d04d205bd4b806dd79478b86a8815dad99 /doc/guides/writing-tests.md
parent69f653dff902bf385dfa0ed0e89be3d0e1f57391 (diff)
downloadandroid-node-v8-4d1e0862ced8134b1b4e57480bbd46ca14e61d0f.tar.gz
android-node-v8-4d1e0862ced8134b1b4e57480bbd46ca14e61d0f.tar.bz2
android-node-v8-4d1e0862ced8134b1b4e57480bbd46ca14e61d0f.zip
doc: fix some links
PR-URL: https://github.com/nodejs/node/pull/14400 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/guides/writing-tests.md')
-rw-r--r--doc/guides/writing-tests.md19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md
index 8c5c2b7455..6868e8681c 100644
--- a/doc/guides/writing-tests.md
+++ b/doc/guides/writing-tests.md
@@ -92,7 +92,7 @@ The test checks functionality in the `http` module.
Most tests use the `assert` module to confirm expectations of the test.
The require statements are sorted in
-[ASCII](http://man7.org/linux/man-pages/man7/ascii.7.html) order (digits, upper
+[ASCII][] order (digits, upper
case, `_`, lower case).
### **Lines 10-21**
@@ -231,9 +231,9 @@ assert.throws(
For performance considerations, we only use a selected subset of ES.Next
features in JavaScript code in the `lib` directory. However, when writing
tests, for the ease of backporting, it is encouraged to use those ES.Next
-features that can be used directly without a flag in [all maintained branches]
-(https://github.com/nodejs/lts). [node.green](http://node.green/) lists
-available features in each release.
+features that can be used directly without a flag in
+[all maintained branches][]. [node.green][] lists available features
+in each release.
For example:
@@ -258,8 +258,7 @@ functions worked correctly with the `beforeExit` event, then it might be named
### Web Platform Tests
Some of the tests for the WHATWG URL implementation (named
-`test-whatwg-url-*.js`) are imported from the
-[Web Platform Tests Project](https://github.com/w3c/web-platform-tests/tree/master/url).
+`test-whatwg-url-*.js`) are imported from the [Web Platform Tests Project][].
These imported tests will be wrapped like this:
```js
@@ -332,13 +331,17 @@ $ make cctest
```
### Node test fixture
-There is a [test fixture] named `node_test_fixture.h` which can be included by
+There is a [test fixture][] named `node_test_fixture.h` which can be included by
unit tests. The fixture takes care of setting up the Node.js environment
and tearing it down after the tests have finished.
It also contains a helper to create arguments to be passed into Node.js. It
will depend on what is being tested if this is required or not.
+[ASCII]: http://man7.org/linux/man-pages/man7/ascii.7.html
[Google Test]: https://github.com/google/googletest
-[Test fixture]: https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#test-fixtures-using-the-same-data-configuration-for-multiple-tests
+[Web Platform Tests Project]: https://github.com/w3c/web-platform-tests/tree/master/url
[`common` module]: https://github.com/nodejs/node/blob/master/test/common/README.md
+[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