Follow-up to #459 and #66 from the pinned Bun Node-API corpus at 4982b91e3702094330f3be3883354c52b8c01323.
Exact failing test:
napi > napi_wrap > has the right lifetime
The native fixture prints finalize_for_create_wrap, data = 42, hint = 123, but Home omits the subsequent delete_the_ref observed under Node. Other napi_wrap coverage, including removal, accepted values, proxy/prototype handling, shared addons, and LIFO teardown, is green.
Acceptance:
- Preserve the wrapped reference until its documented finalization point.
- Run the finalizer and reference deletion exactly once in Node-compatible order.
- Add a focused lifecycle regression covering GC and environment teardown.
- Re-run the pinned
napi/napi.test.tscorpus file.