You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix npm test on Node 24+ and cover the teardown abort
Two things, both about being able to run the suite at all on current Node.
The test script passed --experimental-async-context-frame unconditionally.
Node 22/23 need it, but Node 24 turned AsyncContextFrame on by default and
removed the flag, so from Node 24 on `npm test` failed before running
anything:
node: bad option: --experimental-async-context-frame
Replace it with a small runner in the style of build.js, which computes the
flag list from the running version. --disable-warning is conditional for the
same reason: it only exists from Node 21.3. The computation lives in
test/node-flags.js because the new test below needs it too, when spawning.
Then add the regression test for the CtxWrap teardown abort fixed in the
previous commit. It runs in a spawned process because the failure is a
SIGABRT: `node --test` runs the file in-process, so an abort takes the whole
file down rather than failing one test. Against the pre-fix addon the run
reports `pass 0, fail 1` with the CtxWrap::~CtxWrap stack, not 48 passes and
one failure — which is also why testing this inline was not an option.
npm test now: 49 pass / 0 fail on Node 22, 24 and 26. Previously 24 and 26
could not run it.
0 commit comments