diff --git a/README.md b/README.md index ae2e7e1dc..cd25bd840 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,28 @@ npm test --NAPI_VERSION=X where X is the version of Node-API you want to target. +To run a specific unit test filters are available + +**Example:** + compile and run only tests on objectwrap.cc and objectwrap.js + ``` + npm run unit --filter=objectwrap + ``` + +Multiple unit tests cane be selected with wildcards + +**Example:** +compile and run all tests files ending with reference -> function_reference.cc object_reference.cc reference.cc + ``` + npm run unit --filter=*reference + ``` + +Multiple filter conditions can be joined as well + +**Example:** + compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file + npm run unit --filter='*function objectwrap' + ### **Debug** To run the **node-addon-api** tests with `--debug` option: