Skip to content

Commit b26c883

Browse files
committed
Clarified @react-native-node-api/node-addon-examples in readme.
1 parent 2b7644f commit b26c883

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# `react-native-node-addon-examples`
1+
# Node Addon Examples (`@react-native-node-api/node-addon-examples`)
22

3-
A wrapper around the examples in the [nodejs/node-addon-examples](https://github.com/nodejs/node-addon-examples) repo, using `gyp-to-cmake` and `cmake-rn` to prepare prebuilds and scaffolding for loading the addons.
3+
We're using the [nodejs/node-addon-examples](https://github.com/nodejs/node-addon-examples) repository from the Node.js project as tests for our Node-API implementation and this package is a wrapper around those, using `gyp-to-cmake` and `cmake-rn` to prepare prebuilds and scaffolding for loading the addons.
44

5-
The main purpose is to use these as tests to verify the implementation. We choose to use this as our first signal for compliance, over the [js-native-api tests in the Node.js project](https://github.com/nodejs/node/tree/main/test/js-native-api), because the examples depends much less on Node.js built-in runtime APIs.
5+
The main purpose is to use these as tests to verify the implementation: We choose to use this as our first signal for compliance, over the [js-native-api](https://github.com/nodejs/node/tree/main/test/js-native-api) tests in the Node.js project, because the examples depends much less on Node.js built-in runtime APIs. A drawback is that these examples were not built as tests with assertions, but examples using console logging to signal functionality and we work around this limitation by wrapping the loading of the example JS code with a console.log stub implementation which buffer and asserts messages printed by the addon.
6+
7+
This package is imported by our [test app](../../apps/test-app).

0 commit comments

Comments
 (0)