Skip to content

Harness scaffold and Node.js implementor#11

Merged
legendecas merged 6 commits intonodejs:mainfrom
kraenhansen:harness-scaffold
Dec 9, 2025
Merged

Harness scaffold and Node.js implementor#11
legendecas merged 6 commits intonodejs:mainfrom
kraenhansen:harness-scaffold

Conversation

@kraenhansen
Copy link
Copy Markdown
Member

@kraenhansen kraenhansen commented Dec 6, 2025

This PR add scaffolding for a test harness.

Merging this PR will:

  • Add a new implementors/node directory with a Node.js specific harness, which will run each test file in the tests directory using the built-in test runner provided by Node.js, based on the structure of the file-system. Each test file is executed in a separate child process to provide isolation (of global state and potential process crashes).
  • Add the first test: Exercising a simple assert function injected into the test's global object by the harness, I intent to use this pattern to provide functionality needed by a test, which might need calls to runtime-specific APIs for implementation.
  • Add a GitHub Actions workflow, highly inspired by the ci.yml workflow from the nodejs/node-addon-api repo.

@kraenhansen kraenhansen marked this pull request as ready for review December 7, 2025 12:41
Comment thread .github/workflows/test.yml Outdated
Comment thread implementors/node/run-tests.ts
Copy link
Copy Markdown
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, thanks!

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
@legendecas legendecas merged commit 1b51488 into nodejs:main Dec 9, 2025
@github-project-automation github-project-automation bot moved this from Need Triage to Done in Node-API Team Project Dec 9, 2025
@kraenhansen kraenhansen deleted the harness-scaffold branch March 7, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants