doc: add example of using filter with cctest
This commit adds examples of specifying filters when running cctest. This can be useful when debugging and limiting the test cases run to the test cases of interest and I think worth documenting. PR-URL: https://github.com/nodejs/node/pull/21401 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
883e1cd21d
commit
b56f65e28c
@ -403,6 +403,16 @@ The test can be executed by running the `cctest` target:
|
||||
$ make cctest
|
||||
```
|
||||
|
||||
A filter can be applied to run single/multiple test cases:
|
||||
```console
|
||||
$ make cctest GTEST_FILTER=EnvironmentTest.AtExitWithArgument
|
||||
```
|
||||
|
||||
`cctest` can also be run directly which can be useful when debugging:
|
||||
```console
|
||||
$ out/Release/cctest --gtest_filter=EnvironmentTest.AtExit*
|
||||
```
|
||||
|
||||
### Node.js test fixture
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user