| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
CI fails on Node.js v20 — same root cause as #28. The nested_wrap addon is built with NAPI_VERSION=10 which isn't fully supported on v20 (see nodejs/node#55676). Blocked on #37 (dropping Node v20 from CI). |
Sorry, something went wrong.
|
We can use the napiVersion and skipTest primitives from #46 to skip this test when napi version < 10 |
Sorry, something went wrong.
Port all three build targets and test files from upstream: - myobject (stable) — object wrap with getters/setters/methods - myobject_basic_finalizer (experimental) — basic finalizer verification - nested_wrap (NAPI_VERSION=10) — nested ref finalization The experimental target (myobject_basic_finalizer) exercises the add_node_api_cts_experimental_addon() CMake function for the first time, serving as end-to-end validation of the experimental infrastructure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
use the napiVersion and skipTest primitives for porting test_6_object_wrap
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| assert.strictEqual(obj, null); | ||
| })(); | ||
|
|
||
| await gcUntil('basic-finalizer', () => addon.getFinalizerCallCount() === 1); |
There was a problem hiding this comment.
It's interesting to see why the original test is asserting the finalizerCallCount again!
assert.strictEqual(addon.getFinalizerCallCount(), 1);
Sorry, something went wrong.
There was a problem hiding this comment.
I agree - that's curious 🤔 Perhaps the git history tells a story? I'd be okay with deleting that in a follow-up PR once we start refactoring these tests.
Sorry, something went wrong.
There was a problem hiding this comment.
I think we should keep it. It's to handle the case where the gcUntil loop finishes without satisfying the condition addon.getFinalizerCallCount() === 1.
Sorry, something went wrong.
There was a problem hiding this comment.
the assertion should fail in that case.
Sorry, something went wrong.
There was a problem hiding this comment.
gcUntil shouldn't finish without error when the predicate is not satisfied. That would be a bug in gcUntil. The defense here would be redundant.
Sorry, something went wrong.
| assert.strictEqual(obj, null); | ||
| })(); | ||
|
|
||
| await gcUntil('basic-finalizer', () => addon.getFinalizerCallCount() === 1); |
There was a problem hiding this comment.
I think we should keep it. It's to handle the case where the gcUntil loop finishes without satisfying the condition addon.getFinalizerCallCount() === 1.
Sorry, something went wrong.
| assert.strictEqual(obj, null); | ||
| })(); | ||
|
|
||
| await gcUntil('basic-finalizer', () => addon.getFinalizerCallCount() === 1); |
There was a problem hiding this comment.
| await gcUntil('basic-finalizer', () => addon.getFinalizerCallCount() === 1); | |
| await gcUntil('basic-finalizer', () => addon.getFinalizerCallCount() === 1); | |
| assert.strictEqual(addon.getFinalizerCallCount(), 1); |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Ports 6_object_wrap from the Node.js test suite into the CTS. This is the first test to exercise the experimental addon infrastructure (add_node_api_cts_experimental_addon()), serving as end-to-end validation of #31.
Three build targets:
Three JS test files:
All C++ source files are copied verbatim from upstream.
Test plan
🤖 Generated with Claude Code