From b474e2a9dd2c3a55b98ebc45787621dd439bd1a9 Mon Sep 17 00:00:00 2001 From: hexbinoct Date: Sat, 1 Aug 2026 09:25:50 +0500 Subject: [PATCH] docs: replace copilot-instructions.md with AGENTS.md Moves the instructions to the root as AGENTS.md, per agents.md. Two changes to the content itself: The porting bullet pointed at `tests/engine/` and `tests/runtime/`, which were renamed to `tests/js-native-api/` and `tests/node-api/` before the first test landed. An agent following it today creates directories the runner never looks in. Adds a section with the build and test commands, since nothing in the repository records that the addons need CMake and a C/C++ toolchain before the suite can run. Fixes: #13 Signed-off-by: hexbinoct Co-Authored-By: Claude Opus 5 --- .github/copilot-instructions.md => AGENTS.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) rename .github/copilot-instructions.md => AGENTS.md (74%) diff --git a/.github/copilot-instructions.md b/AGENTS.md similarity index 74% rename from .github/copilot-instructions.md rename to AGENTS.md index d346252..646ea2f 100644 --- a/.github/copilot-instructions.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# Copilot Instructions for node-api-cts +# node-api-cts ## Project Overview @@ -13,6 +13,20 @@ Node-API Conformance Test Suite: A pure ECMAScript test suite for Node-API imple - **Process Isolation**: The built-in runner for Node.js, run each test in isolation to prevent crashes from aborting entire test suite. ## Development Focus -- Port existing tests from `nodejs/node/test/js-native-api` into `tests/engine/` and `nodejs/node/test/node-api` into `tests/runtime/`, removing dependencies on Node.js runtime APIs while preserving test coverage +- Port existing tests from `nodejs/node/test/js-native-api` into `tests/js-native-api/` and `nodejs/node/test/node-api` into `tests/node-api/`, removing dependencies on Node.js runtime APIs while preserving test coverage - Structure tests for easy integration by external implementors - Consider following patterns from [web-platform-tests](https://web-platform-tests.org/) and [WebGPU CTS](https://github.com/gpuweb/cts) projects where applicable. + +## Building and Running the Tests + +Building the addons needs CMake and a C/C++ toolchain on the `PATH`, alongside Node.js. + +```sh +npm ci +npm run addons:configure # cmake -S . -B ./build +npm run addons:build # cmake --build ./build +npm run node:test # run the suite through the Node.js implementor +npm run lint # eslint && tsc +``` + +Rebuild the addons after touching any C file. `npm run addons:clean` removes the build directory along with the built `.node` files.