Skip to content

Commit b474e2a

Browse files
hexbinoctclaude
andcommitted
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 <abubakarm@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 9aa4c88 commit b474e2a

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copilot Instructions for node-api-cts
1+
# node-api-cts
22

33
## Project Overview
44

@@ -13,6 +13,20 @@ Node-API Conformance Test Suite: A pure ECMAScript test suite for Node-API imple
1313
- **Process Isolation**: The built-in runner for Node.js, run each test in isolation to prevent crashes from aborting entire test suite.
1414

1515
## Development Focus
16-
- 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
16+
- 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
1717
- Structure tests for easy integration by external implementors
1818
- Consider following patterns from [web-platform-tests](https://web-platform-tests.org/) and [WebGPU CTS](https://github.com/gpuweb/cts) projects where applicable.
19+
20+
## Building and Running the Tests
21+
22+
Building the addons needs CMake and a C/C++ toolchain on the `PATH`, alongside Node.js.
23+
24+
```sh
25+
npm ci
26+
npm run addons:configure # cmake -S . -B ./build
27+
npm run addons:build # cmake --build ./build
28+
npm run node:test # run the suite through the Node.js implementor
29+
npm run lint # eslint && tsc
30+
```
31+
32+
Rebuild the addons after touching any C file. `npm run addons:clean` removes the build directory along with the built `.node` files.

0 commit comments

Comments
 (0)