n-api: Reference and external tests
- Add a test project to
addons-napi
that covers the N-API reference and external APIs - Fix a bug in
napi_typeof()
that was found by the new tests
This improves the code coverage of N-API by a few percent. See also https://github.com/nodejs/node/issues/12219
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines