Port the make_callback test addon from #219 and enable node-api/test_async in node-tests
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- c, cmake, javascript, node.js, typescript
- Ambito
- build-system, testing-qa
Direzione di ricerca
Inizia da packages/node-addon-examples/src/index.ts, dal modello CMake di tests/async, da scripts/copy-tests.mts e da packages/node-tests/common.ts; confronta i file make_callback di #219 con l’addon threadsafe-function di #398. Esegui i controlli del repository per node-addon-examples e node-tests. Il lavoro è completato quando l’addon viene compilato e registrato, node-api/test_async è abilitato ed entrambi i percorsi di test hanno esito positivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Two test-coverage follow-ups deferred from #398. Both validate functionality that Hermes' first-party Node-API implementation provides on its own (independent of the hermes_napi_host integration), so they were split out as test-infrastructure work.
1. Port the make_callback test addon from #219
napi_async_init / napi_async_destroy / napi_make_callback are provided natively by the vendored Hermes since the static_h adoption (the injector binds the full symbol surface), which obsoletes #219's host-side C++ implementation — but its test addon (tests/make_callback/: addon.c adapted from Node's own test plus a promise-less driver asserting receiver/argument/return-value plumbing) ports directly to the packages/node-addon-examples/tests/<name>/ pattern established there and in #398:
- Copy
addon.c,addon.js,binding.gypfrom #219 (credit @paradowstack), add the checked-inCMakeLists.txtper thetests/asynctemplate and apackage.jsonwith a unique name (e.g.make-callback-test). - Register under
suites.testsinpackages/node-addon-examples/src/index.ts.
Expected to pass as-is against next — a failure would be a real conformance finding against Hermes' implementation.
2. Enable node-api/test_async in packages/node-tests
The entry exists but is commented out in scripts/copy-tests.mts's ALLOW_LIST. Two independent blockers:
commonshims: the bundling pipeline aliases../../commontopackages/node-tests/common.ts, which currently only exportsbuildType. Upstreamtest.jsusescommon.mustCall. A faithfulmustCall/mustCallAtLeast/mustNotCallneeds a home for its verification step: upstream checks call counts at process exit, which has no analogue in the long-lived mocha-remote app — the shim needs a per-test verification hook wired into the generated suite (e.g. anafterEach-style flush exposed fromcommon.ts).<uv.h>in the C side: upstreamtest_async.cincludes<uv.h>directly, so enabling it also needs a small uv shim along the lines of the pthread-based one written fortests/threadsafe-function/addon.cin #398 (or an upstream contribution making the test buildable without libuv).
Note on value: the behavioral coverage largely overlaps the hand-written tests/async addon (create/queue/cancel/delete, cancel-while-queued via pool saturation — upstream's MAX_CANCEL_THREADS 6 trick is the same one tests/async already uses — plus the #398 additions for thread identity and cancel-while-running). The win from enabling the upstream suite is conformance tracking against Node itself rather than new coverage, which is also why it wasn't a blocker for #398.
- Lingua principale
- TypeScript
- Stelle
- 188
- Fork
- 10
- Merge medio
- 2g 17h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/react-native-node-api
-
Android 🤖
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects ApertaAndroid 🤖 good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/react-native-node-api#163 · 1 commento ·
-
enhancement good first issue gyp-to-cmake
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
callstackincubator/react-native-node-api#161 · 3 commenti · 1 reazione ·
-
enhancement Host 🏡
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Automatable good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 15/100
callstackincubator/react-native-node-api#424 · 1 commento ·
Tutte le issue di callstackincubator/react-native-node-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
corsairdev/corsair#1764 ·