Skip to content

feat: port test_constructor to CTS#29

Open
kraenhansen wants to merge 1 commit intonodejs:mainfrom
kraenhansen:feat/port-test-constructor
Open

feat: port test_constructor to CTS#29
kraenhansen wants to merge 1 commit intonodejs:mainfrom
kraenhansen:feat/port-test-constructor

Conversation

@kraenhansen
Copy link
Copy Markdown
Contributor

@kraenhansen kraenhansen commented Mar 1, 2026

Summary

Ports test_constructor from the Node.js test suite to the CTS.

  • Exercises napi_define_class with method, value, accessor, and static property descriptors
  • Verifies enumerable/non-enumerable and writable/readonly semantics on instance and static properties
  • Tests null-argument handling for napi_define_class (via test_null.c / test_null.js)
  • Three JS test files: test.js, test2.js, test_null.js

Test plan

  • npm run addons:configure && npm run addons:build — compiles cleanly
  • npm run node:test — all 58 tests pass (3 new)

🤖 Generated with Claude Code

@legendecas legendecas moved this from Need Triage to In Progress in Node-API Team Project Mar 20, 2026
Exercises napi_define_class with method, data value, accessor, and
static property descriptors. Includes null-argument tests for
napi_define_class via test_null.c/test_null.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kraenhansen kraenhansen force-pushed the feat/port-test-constructor branch from b726a69 to 238dd42 Compare March 28, 2026 19:29
@kraenhansen kraenhansen marked this pull request as ready for review March 28, 2026 19:53
@kraenhansen
Copy link
Copy Markdown
Contributor Author

Rebased and ready for review 👍

Copy link
Copy Markdown

@bavulapati bavulapati left a comment

Choose a reason for hiding this comment

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

LGTM
Most of the files are identical. Just the usage of globals instead of required values like assert, loadAddon instead of require, etc.,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants