summaryrefslogtreecommitdiff
path: root/doc/guides
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2017-12-17 20:32:28 -0300
committerRuben Bridgewater <ruben@bridgewater.de>2017-12-26 10:41:17 +0100
commit6924dac6cef7a0eae661903a17b1d35e22166c27 (patch)
tree1a330a54757f1521f2a86cea363a8f0ca0f40d9f /doc/guides
parent5c2901391a656a5c3b931590e39a9c182b7aecd3 (diff)
downloadandroid-node-v8-6924dac6cef7a0eae661903a17b1d35e22166c27.tar.gz
android-node-v8-6924dac6cef7a0eae661903a17b1d35e22166c27.tar.bz2
android-node-v8-6924dac6cef7a0eae661903a17b1d35e22166c27.zip
doc: use consistent new lines
PR-URL: https://github.com/nodejs/node/pull/17722 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'doc/guides')
-rw-r--r--doc/guides/maintaining-V8.md1
-rw-r--r--doc/guides/writing-and-running-benchmarks.md2
-rw-r--r--doc/guides/writing-tests.md5
3 files changed, 8 insertions, 0 deletions
diff --git a/doc/guides/maintaining-V8.md b/doc/guides/maintaining-V8.md
index 887c9a8766..d45fa07207 100644
--- a/doc/guides/maintaining-V8.md
+++ b/doc/guides/maintaining-V8.md
@@ -275,6 +275,7 @@ Original commit message:
Refs: https://github.com/v8/v8/commit/a51f429772d1e796744244128c9feeab4c26a854
PR-URL: https://github.com/nodejs/node/pull/7833
```
+
* Open a PR against the `v6.x-staging` branch in the Node.js repo. Launch the
normal and [V8 CI] using the Node.js CI system. We only needed to backport to
`v6.x` as the other LTS branches weren't affected by this bug.
diff --git a/doc/guides/writing-and-running-benchmarks.md b/doc/guides/writing-and-running-benchmarks.md
index 75435daf39..22e235df32 100644
--- a/doc/guides/writing-and-running-benchmarks.md
+++ b/doc/guides/writing-and-running-benchmarks.md
@@ -144,6 +144,7 @@ arrays/zero-int.js n=25 type=Buffer: 90.49906662339653
```
It is possible to execute more groups by adding extra process arguments.
+
```console
$ node benchmark/run.js arrays buffers
```
@@ -439,6 +440,7 @@ function main(conf) {
```
Supported options keys are:
+
* `port` - defaults to `common.PORT`
* `path` - defaults to `/`
* `connections` - number of concurrent connections to use, defaults to 100
diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md
index 1fa2b3c558..b2cd8ed8b2 100644
--- a/doc/guides/writing-tests.md
+++ b/doc/guides/writing-tests.md
@@ -306,12 +306,14 @@ the upstream project, send another PR here to update Node.js accordingly.
Be sure to update the hash in the URL following `WPT Refs:`.
## C++ Unit test
+
C++ code can be tested using [Google Test][]. Most features in Node.js can be
tested using the methods described previously in this document. But there are
cases where these might not be enough, for example writing code for Node.js
that will only be called when Node.js is embedded.
### Adding a new test
+
The unit test should be placed in `test/cctest` and be named with the prefix
`test` followed by the name of unit being tested. For example, the code below
would be placed in `test/cctest/test_env.cc`:
@@ -345,18 +347,21 @@ static void at_exit_callback(void* arg) {
```
Next add the test to the `sources` in the `cctest` target in node.gyp:
+
```console
'sources': [
'test/cctest/test_env.cc',
...
],
```
+
Note that the only sources that should be included in the cctest target are
actual test or helper source files. There might be a need to include specific
object files that are compiled by the `node` target and this can be done by
adding them to the `libraries` section in the cctest target.
The test can be executed by running the `cctest` target:
+
```console
$ make cctest
```