Node.js Collection
Published in

Node.js Collection

Help Wanted: Node Addon API’s Road to Full Unit Test Coverage

This blog was written by Jack Xia, with additional contributions from the Node-API working group and project collaborators.

Hello everyone! The Node-API working group needs some help from the community to achieve full unit test coverage for the node-addon-api project.

If you aren’t familiar with writing native C++ addons for Node.js or what we do, this blog post (https://nodejs.medium.com/building-modern-native-add-ons-for-node-js-in-2020-cd3992c68e0) and the node-addon-api Github repo (https://github.com/nodejs/node-addon-api) is a great place to start.

We’ve made it one of our milestones to achieve full testing coverage. Although we have completed documenting existing tests for our C++ classes, there are still quite a few gaps that we have yet to cover. We’ve labeled test coverage reports as “good first issue” and any empty entries in these tables mean that test coverage is missing for the class method. PRs are welcome! 😊

Speaking as someone who joined the Node-API working group as a mentee, writing tests was a great way for me to become more acquainted with writing node addons and to understand how Node.js works under the hood. If you are looking into contributing to an open-source project and have an interest in the native side of Node.js, this is a great starting point!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store