https://github.com/nodejs/node-api-cts
Node.js js-native-api-test suite, externalized so that it can be used to test Node-API implementations outside of Node.js
https://github.com/nodejs/node-api-cts
Last synced: 6 months ago
JSON representation
Node.js js-native-api-test suite, externalized so that it can be used to test Node-API implementations outside of Node.js
- Host: GitHub
- URL: https://github.com/nodejs/node-api-cts
- Owner: nodejs
- License: mit
- Created: 2018-10-15T20:47:45.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-12-31T19:56:27.000Z (7 months ago)
- Last Synced: 2026-01-05T06:35:55.056Z (7 months ago)
- Language: C
- Homepage:
- Size: 21.5 KB
- Stars: 14
- Watchers: 17
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Node-API Conformance Test Suite (`node-api-cts`)
A test suite for Node-API implementors across different JS engines and runtimes.
Written in ECMAScript & C/C++ with an implementor customizable harness.
> [!IMPORTANT]
> This repository is currently a work-in-progress and shouldn't yet be relied on by anyone.
## Overview
### Tests
The tests are divided into three buckets:
- `tests/harness/*` exercising the implementor's test harness.
and two parts based on the two header files declaring the Node-API functions:
- `tests/js-native-api/*` testing the engine-specific part of Node-API defined in the [`js_native_api.h`](https://github.com/nodejs/node-api-headers/blob/main/include/js_native_api.h) header.
- `tests/node-api/*` testing the runtime-specific part of Node-API defined in the [`node_api.h`](https://github.com/nodejs/node-api-headers/blob/main/include/node_api.h) header.
### Implementors
This repository offers an opportunity for implementors of Node-API to maintain (parts of) their implementor-specific harness inside this repository, in a sub-directory of the `implementors` directory. We do this in hope of increased velocity from faster iteration and potentials for reuse of code across the harnesses.
We maintain a list of other runtimes implementing Node-API in [doc/node-api-engine-bindings.md](https://github.com/nodejs/abi-stable-node/blob/doc/node-api-engine-bindings.md#node-api-bindings-in-other-runtimes) of the `nodejs/abi-stable-node` repository.