node/test/fixtures
Filip Skokan 1c16b45d35
lib: refactor internal webidl converters
Rework lib/internal/webidl.js into a documented shared converter module
that follows the Web IDL conversion algorithms more closely.

Improvements:
- Add documented converters and helper factories for primitive values,
  dictionaries, enums, sequences, interfaces, required arguments,
  integers, `Uint8Array`, and `BufferSource`.
- Move WebCrypto onto the shared converters, while keeping compatibility
  wrappers for its existing `BufferSource` and `BigInteger` behavior.
- Use shared converters from Blob, Performance, Web Locks, and
  structured clone option handling.
- Add benchmarks for `ConvertToInt` and WebCrypto Web IDL converter hot
  paths.
- Add focused tests for core converters, WebCrypto converters, integer
  conversion, and buffer source behavior.

Fixes:
- Make the shared `BufferSource` and `Uint8Array` converters reject
  resizable `ArrayBuffer` and growable `SharedArrayBuffer` backing
  stores unless explicitly allowed. WebCrypto preserves its legacy
  resizable backing-store behavior through compatibility wrappers until
  a semver-major follow-up can opt in to the stricter behavior.
- Use Web IDL `ToNumber` and `ToString` behavior for BigInt, Symbol, and
  object primitive conversion.
- Use exact BigInt modulo for 64-bit `ConvertToInt` wrapping and
  document the final Number approximation behavior.
- Normalize mathematical modulo results to `+0` where Web IDL requires
  it.
- Process inherited dictionaries in least-derived to most-derived order,
  sorting members only within each dictionary level.
- Use `IteratorComplete` truthiness for sequence conversion.
- Cover detached buffers, resizable-backed views, growable-backed views,
  cross-realm buffer sources, mutation-after-call behavior, inherited
  dictionary member order, and sequence iterator completion behavior.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62979
Backport-PR-URL: https://github.com/nodejs/node/pull/63563
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-06-23 01:06:46 +01:00
..
0-dns
apilinks
b
clustered-server
console test: unify assertSnapshot stacktrace transform 2026-04-08 23:53:06 +02:00
copy test: add test that uses multibyte for path and resolves modules 2025-01-25 08:32:23 +01:00
crypto crypto: rename CShakeParams and KmacParams length to outputLength 2026-04-04 00:05:20 +02:00
cycles
debugger debugger: add edit-free runtime expression probes to node inspect 2026-05-07 15:41:42 +02:00
disable-signal test: add line break at end of file 2025-01-16 15:54:48 +01:00
dotenv util: fix parseEnv incorrectly splitting multiple ‘=‘ in value 2025-05-02 17:06:02 -03:00
encoding lib: implement all 1-byte encodings in js 2026-01-19 19:19:31 +01:00
errors test: unify assertSnapshot stacktrace transform 2026-04-08 23:53:06 +02:00
es-module-loaders test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
es-module-require-cache
es-module-shadow-realm
es-module-specifiers
es-module-url
es-modules esm: fix source phase identity bug in loadCache eviction 2026-04-10 14:52:27 +02:00
eval test: unify assertSnapshot stacktrace transform 2026-04-08 23:53:06 +02:00
GH-7131
GH-54265 lib: fix emit warning for debuglog.time when disabled 2024-08-27 16:20:35 +00:00
global
icu deps: update icu to 78.2 2026-01-27 22:50:37 +01:00
import-require-cycle esm: add ERR_REQUIRE_ESM_RACE_CONDITION 2026-05-07 15:41:41 +02:00
inspect-worker inspector: support for worker inspection in chrome devtools 2025-05-16 07:07:02 +02:00
inspector-instrumentation-breakpoint test: add Debugger.setInstrumentationBreakpoint known issue 2024-05-12 22:33:07 +02:00
inspector-network-resource inspector: initial support for Network.loadNetworkResource 2025-07-17 16:57:11 +02:00
internal-modules
json-with-directory-name-module
keys crypto: wire ML-DSA and ML-KEM for use when using BoringSSL 2026-06-23 01:06:42 +01:00
macos-app-sandbox
module-extension-over-directory
module-hooks module: run require.resolve through module.registerHooks() 2026-04-10 14:52:16 +02:00
module-load-order
module-mocking test_runner: support mocking json modules 2025-05-02 17:06:47 -03:00
module-require module: fix bad require.resolve with option paths for . and .. 2025-01-25 23:32:13 +00:00
module-require-symlink
nested-index
node_modules url: suppress warnings from url.format/url.resolve inside node_modules 2026-04-10 15:54:18 +02:00
npm-install test: use on-disk fixture for test-npm-install 2026-05-07 15:41:34 +02:00
openssl3-conf
options-as-flags src: add internal GetOptionsAsFlags 2025-08-21 19:01:02 +02:00
package-main-enoent
packages test: add case for unrecognised fields within pjson "exports" 2025-02-15 11:45:13 -08:00
permission test: improve config-file permission test coverage 2026-05-07 18:14:54 +02:00
postject-copy
process test: reduce flakiness of different-registry-per-thread 2026-06-18 00:15:54 +02:00
process-env cli: implement --trace-env and --trace-env-[js|native]-stack 2024-11-27 09:44:16 +00:00
rc src,test: fix config file parsing for flags defaulted to true 2025-07-21 10:59:02 +02:00
repl-folder-extensions/foo.js
require-bin
require-empty-main
resolve-paths
run-script cli: ensure --run has proper pwd 2024-09-18 12:18:40 +00:00
sea src: add initial support for ESM in embedder API 2026-02-22 23:16:14 +01:00
self_ref_module
snapshot test: use unusual chars in the path to ensure our tests are robust 2024-12-30 00:17:44 +00:00
source-map test: unify assertSnapshot stacktrace transform 2026-04-08 23:53:06 +02:00
syntax
test-init-index
test-init-native
test-module-loading-globalpaths
test-repl-tab-completion
test-runner test: avoid test_runner watch restart in spec snapshot 2026-06-18 21:12:34 +01:00
test-runner-watch test: move test-runner-watch-mode helper into common 2025-11-13 22:44:12 +01:00
test426 test: update test426-fixtures to 9b9e225b5a63139e9a95cdd1bf874a8f0b9d131 2026-06-18 21:12:34 +01:00
tools/checkimports
typescript module: use sync cjs when importing cts 2025-10-06 16:24:41 +02:00
uncaught-exceptions
v8-coverage
vm test: unify assertSnapshot stacktrace transform 2026-04-08 23:53:06 +02:00
warning_node_modules src: implement IsInsideNodeModules() in C++ 2024-10-08 10:19:46 +00:00
wasi
watch-mode
webcrypto lib: refactor internal webidl converters 2026-06-23 01:06:46 +01:00
workload
wpt test: update WPT for WebCryptoAPI to 97bbc7247a 2026-06-23 01:06:45 +01:00
x509-escaping
.empty-hidden-repl-history-file
.empty-repl-history-file
.node_repl_history
.node_repl_history_multiline repl: add support for multiline history 2025-05-02 17:06:20 -03:00
a.js
aead-vectors.js
altdocs.md
array-hash-collision.js build,test: test array index hash collision 2026-03-23 13:16:48 -05:00
assert-first-line.js
assert-long-line.js
async-error.js
baz.js
catch-stdout-error.js
child-process-echo-options.js
child-process-message-and-exit.js
child-process-persistent.js
child-process-spawn-node.js
child-process-stay-alive-forever.js
child_process_should_emit_error.js
cjs-module-wrap.js
cjs-module-wrapper.js
cluster-preload-test.js
cluster-preload.js
compile-cache-flush.js module: implement flushCompileCache() 2024-09-20 19:05:07 +00:00
compile-cache-wrapper-options.js module: fix directory option in the enableCompileCache() API 2025-11-18 13:00:21 +01:00
compile-cache-wrapper.js src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE 2024-08-28 23:22:57 +00:00
crash.wasm
crash.wat
debugger-repeat-last.js
debugger-util-regression-fixture.js
deep-exit.js src: parse --stack-trace-limit and use it in --trace-* flags 2024-09-30 15:05:12 +00:00
define-global.js
deprecated-userland-class.js
deprecated-userland-function.js
deprecated-userland-subclass.js
deprecated.js
destroy-stdin.js
disable-warning-worker.js
disable-warning.js
doc_inc_1.md
doc_inc_2.md
doc_with_backticks_in_headings.md
doc_with_yaml.md
document_with_cjs_and_esm_code_snippet.md
document_with_esm_and_cjs_code_snippet.md
document_with_links.md
document_with_special_heading.md
echo-close-check.js
echo.js
elipses.txt
empty-with-bom.txt
empty.cjs
empty.js
empty.json
empty.txt
emptyframe.http2
exit.js
experimental.json
exports-function-with-param.js
external-repl-module.js
failcounter.js
failmustcall1.js
failmustcall2.js
fetch-and-log.mjs http: add http.setGlobalProxyFromEnv() 2026-02-22 23:16:06 +01:00
file-to-read-with-bom.txt
file-to-read-without-bom.txt
fixture.ini
foo
gc.js
get-call-sites.js util: fix util.getCallSites plurality 2024-11-02 15:24:56 +00:00
GH-892-request.js
GH-1899-output.js
google_ssl_hello.bin
inspector-global-function.mjs
inspector-open.js
intrinsic-mutation.js
invalid.json
is-object.js
ispreloading.js
kill-signal-for-watch.js test: apply a delay to watch-mode-kill-signal tests 2025-11-13 22:44:24 +01:00
klass-with-fields.js
leakedGlobal.js
linux-perf-logger.js
linux-perf.js
list-certs.js src: fix off-thread cert loading in bundled cert mode 2026-01-19 19:19:16 +01:00
loader-is-internal-thread.js src,worker: add isInternalWorker 2025-01-14 18:24:30 +00:00
loop.js
mime-whatwg-generated.js
mime-whatwg.js
module-loading-error.node
monkey-patch-run-main.js
net-fd-passing-receiver.js
no-wrapper.js
not-main-module.js
old-repl-history-file-faulty.json
old-repl-history-file-obj.json
openssl_fips_disabled.cnf
openssl_fips_enabled.cnf
order_of_end_tags_5873.md
out-of-bound.wasm
out-of-bound.wat
outside.txt
overwrite-config-preload-module.js
parent-process-nonpersistent-fork.js
parent-process-nonpersistent.js
parse-args.js test: check util.parseArgs argv parsing with actual process execution 2026-01-19 19:19:31 +01:00
path-resolve.js
path.js
person-large.jpg
person.jpg
person.jpg.br
person.jpg.gz
person.jpg.zst zlib: add zstd support 2025-02-08 12:43:53 +00:00
pkgexports.mjs module: support 'module.exports' interop export in require(esm) 2024-10-01 21:13:03 -07:00
post-resource-and-log.js http,https: add built-in proxy support in http/https.request and Agent 2025-07-21 10:55:40 +02:00
primitive-42.json module: link module with a module request record 2025-07-08 11:16:18 -03:00
print A.js
print-10-lines.js
print-chars-from-buffer.js
print-chars.js
print-delayed.js
print-error-message.js
print-intrinsic-mutation-name.js
printA.js
printB.js
printC.js
proxy-server-worker.js http,https: add built-in proxy support in http/https.request and Agent 2025-07-21 10:55:40 +02:00
pseudo-multimember-gzip.gz
pseudo-multimember-gzip.z
pss-vectors.json
readfile_pipe_test.txt
recursive-a.cjs
recursive-b.cjs
recvfd.js
registerExt.hello.world
registerExt.test
registerExt2.test
repl-load-multiline-no-trailing-newline.js
repl-load-multiline.js
repl-pretty-stack.js
repl-tab-completion-nested-repls.js
report-oom.js
request-and-log.js http: add http.setGlobalProxyFromEnv() 2026-02-22 23:16:06 +01:00
require-resolve.js
rsa-oaep-test-vectors.js
sample.png
sample_document.md
sea-exec-argv-empty.js sea: support execArgv in sea config 2025-08-21 19:01:03 +02:00
sea-exec-argv-extension-cli.js sea: implement execArgvExtension 2025-08-26 08:01:34 +02:00
sea-exec-argv-extension-env.js sea: implement execArgvExtension 2025-08-26 08:01:34 +02:00
sea-exec-argv-extension-none.js sea: implement execArgvExtension 2025-08-26 08:01:34 +02:00
sea-exec-argv.js sea: support execArgv in sea config 2025-08-21 19:01:03 +02:00
sea.js sea: suppress builtin warning with disableExperimentalSEAWarning option 2025-02-17 19:42:17 -08:00
semicolon.js
shared-memory.wasm
shared-memory.wat
should_exit.js
simple.wasm
simple.wat
spawn-worker-with-copied-env.js test: skip --title check on IBM i 2024-07-22 11:39:04 +00:00
spawn-worker-with-trace-exit.js worker: allow copied NODE_OPTIONS in the env setting 2024-07-05 18:40:03 +00:00
spawn_closed_stdio.py
test-error-first-line-offset.js
test-fs-readfile-error.js
test-fs-stat-sync-overflow.js
test-inspector-dom-storage.mjs test: generate localstorage.db in a temp dir 2026-05-09 09:32:21 +02:00
test-nodetiming-uvmetricsinfo.js src,lib: add performance.uvMetricsInfo 2024-08-30 14:22:28 +00:00
test-resolution-inspect-brk-main.ext
test-resolution-inspect-brk-resolver.js
test-runner-watch.mjs test_runner: add cwd option to run 2024-10-03 15:45:49 +00:00
throws_error.js
throws_error1.js
throws_error2.js
throws_error3.js
throws_error4.js
throws_error5.js
throws_error6.js
throws_error7.js
tls-check-extra-ca-certificates.js tls: implement tls.getCACertificates() 2025-05-02 17:04:56 -03:00
tls-connect.js Revert "util: move util._extend to eol" 2024-06-14 13:07:58 +00:00
tls-extra-ca-override.js crypto: add tls.setDefaultCACertificates() 2025-07-21 10:59:01 +02:00
tls-get-ca-certificates.js tls: implement tls.getCACertificates() 2025-05-02 17:04:56 -03:00
tls-session-ticket.txt
tz-version.txt deps: update timezone to 2026b 2026-05-07 15:41:48 +02:00
url-idna.js
url-searchparams.js
url-setter-tests-additional.js
url-tests-additional.js
utf8-bom-shebang-shebang.js
utf8-bom.js
utf8-bom.json
utf8-shebang-bom.js
utf8_test_text.txt
value.cjs module: do not invoke resolve hooks twice for imported cjs 2026-02-22 23:16:14 +01:00
warnings.js
wasi-preview-1.js lib: expose setupInstance method on WASI class 2025-07-08 11:44:43 -03:00
worker-data.cjs
worker-data.mjs
worker-from-argv.js
worker-is-internal-thread.js src,worker: add isInternalWorker 2025-01-14 18:24:30 +00:00
worker-name.js
worker-preload.js
worker-script.mjs
worker-script.ts
x.txt
x1024.txt