test: enable 27 already-passing Node v26.3.0 upstream tests
What
Enables 27 upstream Node v26.3.0 tests that already pass against current Bun but were never vendored, so they weren't counted and weren't protected against regression.
No source changes. No test edits. No expectations.txt entries.
How these were chosen
- Took every upstream test not already vendored on
mainand not claimed by an in-flight PR: 837 candidates. - Ran each exactly the way
scripts/runner.node.mjsdoes:bun run <file>(orbun testwhen the file referencesnode:test), same env. - Kept only tests passing 5/5 consecutive runs.
- Re-verified all survivors in a clean checkout against the repo's real fixtures, 3/3.
- Dropped 7 more after CI build #74354 / code review (see below).
Deliberately excluded:
- tests that skip rather than execute (
1..0 # Skipped): a skip is not a passing test - 3 flaky across local runs:
test-macos-app-sandbox.js,test-pipe-stream.js,test-pipe-unref.js test-permission-net-websocket.js, which only "passed" because an outbound WebSocket to an external host errored for the wrong reason- 7 dropped after CI / review:
test-webstorage-without-sqlite.js:typeof sessionStorageis'undefined'in Bun (fails on every lane; only passed locally underbun testwhich defines it)test-gc-net-timeout.js: hangs at 5/7 collected on x64-asan / x64-baselinetest-http2-ping-flood.js: timeout on Windows aarch64test-worker-dns-terminate.js: heap-use-after-free under ASAN (real bug, tracked separately)test-worker-fshandles-error-on-termination.js/test-worker-fshandles-open-close-on-termination.js: LeakSanitizer reportsConcurrentTaskleak on worker termination under ASANtest-queue-microtask-uncaught-asynchooks.js: passes for the wrong reason. Bun does not instrumentMicrotaskin async_hooks soeventsstays[]; theprocess.on('exit')assertion throws, but since a780f573a1 routes exit-listener throws throughuncaughtExceptionthe test's own handler swallows it and the process exits 0
Every file is byte-identical to its v26.3.0 counterpart (verified with cmp). test-wasm.mjs needs fixtures/wasm/jspi.wasm (85 bytes), copied verbatim.
Several test-gc-* files declare // Flags: --expose-gc. The runner doesn't pass per-test flags, and Bun exposes global.gc by default, so they execute for real: test-gc-http-client.js collects 80/80 requests. test-promise-race-memory-leak.js and test-shadow-realm-gc.js declare // Flags: --max-old-space-size=... which has no Bun equivalent, so they don't guard the specific leak upstream wrote them for, but they still exercise 100k Promise.race / 100 ShadowRealm+Worker roundtrips (same shape as test-shadow-realm-gc-module.js already on main).
Tests added (27)
test-async-wrap-tlssocket-asyncreset.jstest-cpu-prof-exit.jstest-diagnostic-channel-http-request-created.jstest-eventtarget-custom-inspect-does-not-throw.jstest-gc-http-client-connaborted.jstest-gc-http-client-onerror.jstest-gc-http-client-timeout.jstest-gc-http-client.jstest-gc-tls-external-memory.jstest-http.jstest-listen-fd-ebadf.jstest-module-create-require-multibyte.jstest-performance-many-marks.jstest-permission-drop-not-enabled.jstest-pipe.jstest-promise-race-memory-leak.jstest-require-resolve-opts-paths-relative.jstest-set-incoming-message-header.jstest-shadow-realm-gc.jstest-socket-write-after-fin.jstest-source-map-invalid-url.jstest-structuredClone-domexception.jstest-tls-hello-parser-failure.jstest-ttywrap-stack.jstest-uncaught-exception-handler-stack-overflow-on-stack-overflow.jstest-uncaught-exception-handler-stack-overflow.jstest-wasm.mjs
no test proof · iteration 0 · docs-only change; test-proof not applicable