Skip to content

Commit

Permalink
Update Readme for filter conditions in unit tests
Browse files Browse the repository at this point in the history
Document all possible filter conditions added in nodejs#1078
  • Loading branch information
deepakrkris authored Aug 19, 2022
1 parent efd6787 commit 5550637
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5550637

Please sign in to comment.