test(node-core): enrich common shim to raise the #800 radar denominator#1754
Merged
Conversation
Adds the most-used common helpers our shim was missing (so tests load under both runtimes instead of node-skipping on `common.X is not a function`): expectsError (51 uses across in-scope tests), getArrayBufferViews, getBufferSources, canCreateSymLink, printSkipMessage, skipIf, expectWarning (no-op), runWithInvalidFD, escapePOSIXShell, plus build flags (isIBMi, isDebug, isASan, isPi, hasOpenSSL3, hasQuic, hasSQLite). Measured on the 10 pure-logic APIs: node-skip 41->37, judged 71->75. (The bulk of remaining node-skips are v22-corpus-under-host-v25 drift, not shim gaps — that's a separate version-alignment call.)
4 tasks
proggeramlug
added a commit
that referenced
this pull request
May 25, 2026
7 PRs landed on main after the v0.5.1027 bump (50c391f) without per-PR tags. Neither v0.5.1026 nor v0.5.1027 were tagged on the remote — v0.5.1028 is the first tag in this window. - #1738 feat(compile): --trace/--focus debugging flags. - #1723/#1741 fix(lockdown): #503 ns[dynamicKey].staticMember. - #1673/#1742 fix(dynamic-import): literal node: builtin specifier. - #1724/#1747 fix(node): Blob/URL globals trigger http-client feature. - #1728/#1749 fix(node:path): win32 normalize/basename/toNamespacedPath. - #1751 test(parity): stream consumers/promises/static batch. - #1754 test(node-core): enrich common shim for #800.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tooling-only follow-up to the #800 radar (
test-compat/node-core). No compiler change.What
Node's
test/parallelcasesrequire('../common'); the radar stages a Perry-compilable shim in its place. When a test uses acommon.*helper the shim doesn't export, it throws under both Node-with-shim and Perry → the case lands innode-skipand is excluded from the judged set, shrinking the denominator.This adds the helpers our in-scope corpus actually uses (counted by frequency across the supported APIs):
expectsError(51 uses) — validator forassert.throws(fn, common.expectsError({code,...}))getArrayBufferViews/getBufferSources— TypedArray/DataView views over a Buffer (buffer tests)canCreateSymLink,printSkipMessage,skipIf,runWithInvalidFD,escapePOSIXShell,expectWarning(no-op)isIBMi,isDebug,isASan,isPi,hasOpenSSL3,hasQuic,hasSQLiteMeasured impact
On the 10 pure-logic APIs (path/querystring/string_decoder/url/util/assert/buffer/events/os/timers), combined with vendoring
test/fixtures: node-skip 41 → 37, judged 71 → 75. Modest — most remaining node-skips are v22-corpus-under-host-v25 drift (e.g.test-util-callbackifydeep-equal mismatch,test-url-parse-formatusingnode:test), which the shim can't fix. The real denominator lever there is aligning the vendored corpus version with the host Node (pinned-version.txt) — left as a separate decision on what version "parity" targets.Validated: shim loads + helpers behave under Node (
expectsErrorvalidates,getArrayBufferViews→ 10 views).