File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,9 @@ Multiple filter conditions can be joined to broaden the test selection
9292 compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file
9393 npm run unit --filter='* function objectwrap'
9494
95+ As an alternative, ` ninja ` can be used to build the tests. Please
96+ follow the instructions in [ Build with ninja] ( doc/contributing/build_with_ninja.md ) .
97+
9598## Debug
9699
97100To run the ** node-addon-api** tests with ` --debug ` option:
Original file line number Diff line number Diff line change 1+ # Build Test with Ninja
2+
3+ Ninja can be used to speed up building tests with optimized parallelism.
4+
5+ To build the tests with ninja and node-gyp, run the following commands:
6+
7+ ``` sh
8+ /node-addon-api $ node-gyp configure -C test -- -f ninja
9+ /node-addon-api $ ninja -C test/build/Release
10+ # Run tests
11+ /node-addon-api $ node ./test/index.js
12+
13+ # Run tests with debug addon
14+ /node-addon-api $ ninja -C test/build/Debug
15+ /node-addon-api $ NODE_API_BUILD_CONFIG=Debug node ./test/index.js
16+ ```
You can’t perform that action at this time.
0 commit comments