0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/fixtures
Denys Otrishko c66e6471e7
lib: remove ERR_INVALID_OPT_VALUE and ERR_INVALID_OPT_VALUE_ENCODING
This will be a start to generalize all argument validation
errors. As currently we throw ARG/OPT, OUT_OF_RANGE, and other more
specific errors.
The OPT errors didn't bring much to the errors as it's just another
variant of ARG error which is sometimes more confusing (some of our code
used OPT errors to denote just argument validation errors presumably
because of similarity of OPT to 'option' and not 'options-object')
and they don't specify the name of the options object where the invalid
value is located. Much better approach would be to just specify path
to the invalid value in the name of the value as it is done in this PR
(i.e. 'options.format', 'options.publicKey.type' etc)

Also since this decreases a variety of errors we have it'd be easier to
reuse validation code across the codebase.

Refs: https://github.com/nodejs/node/pull/31251
Refs: https://github.com/nodejs/node/pull/34070#discussion_r467251009
Signed-off-by: Denys Otrishko <shishugi@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34682
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-09-11 17:54:42 +03:00
..
0-dns doc: normalize Bash code block info strings 2020-05-25 19:08:45 +02:00
apilinks tools,doc: apilinks should handle root scenarios 2018-09-09 17:48:56 -07:00
b
clustered-server
cycles module: do not check circular dependencies for exported proxies 2020-05-15 01:55:28 +02:00
es-module-loaders module: remove dynamicInstantiate loader hook 2020-05-27 16:38:38 -07:00
es-module-require-cache module: Allow runMain to be ESM 2017-09-07 15:18:32 -05:00
es-module-specifiers esm: modify resolution order for specifier flag 2019-10-16 22:01:19 -04:00
es-module-url module: Allow runMain to be ESM 2017-09-07 15:18:32 -05:00
es-modules esm: better package.json parser errors 2020-09-11 05:09:44 -07:00
GH-7131 lib: include cached modules in module.children 2017-07-24 16:56:31 +02:00
global
internal-modules
json-with-directory-name-module
keys test: generate des rsa_cert.pfx 2019-07-05 22:39:22 -07:00
macos-app-sandbox src: tolerate EPERM returned from tcsetattr 2020-06-25 10:56:34 -07:00
module-extension-over-directory module: check file ext before dir as documented 2018-03-11 02:56:56 +01:00
module-load-order
module-require
module-require-symlink test: do not write fixture in test-require-symlink 2017-09-19 15:42:16 -07:00
nested-index
node_modules module: custom --conditions flag option 2020-08-11 14:35:44 -07:00
package-main-enoent test: remove bluebird remnants from test fixture 2020-01-22 22:10:05 -08:00
packages module: throw an error for invalid package.json main entries 2019-03-27 17:11:53 +01:00
policy policy: implement scopes field 2020-08-26 14:35:34 -05:00
repl-folder-extensions/foo.js repl: include folder extensions in autocomplete 2017-08-13 01:03:30 -07:00
require-bin
require-empty-main test: use index.js if package.json "main" is empty 2020-03-09 13:23:16 +01:00
resolve-paths module: replace default paths in require.resolve() 2017-11-21 11:38:12 -05:00
self_ref_module module: self referential modules in repl or -r 2020-07-23 07:50:01 -07:00
source-map errors: print original exception context 2020-05-24 22:03:34 -07:00
syntax esm: phase two of new esm implementation 2019-03-27 15:52:11 -04:00
test-init-index lib: move DEP0026 to end of life 2019-01-10 08:59:57 -05:00
test-init-native lib: move DEP0026 to end of life 2019-01-10 08:59:57 -05:00
test-module-loading-globalpaths
test-repl-tab-completion repl: add autocomplete for filesystem modules 2019-04-29 07:28:27 +05:30
tools/checkimports tools: fix check-imports.py to match on word boundaries 2020-05-28 10:02:46 -04:00
uncaught-exceptions test: improve logged errors 2020-02-09 13:36:39 +01:00
v8-coverage test: use spread object 2020-01-03 01:44:54 +01:00
wasi test: add wasi test for freopen() 2020-01-23 05:22:36 -08:00
workload test: remove FIB environment variable from cpu-prof.js 2019-06-13 23:01:42 -07:00
wpt url: remove gopher from special schemes 2020-06-06 11:11:02 +02:00
.empty-hidden-repl-history-file
.empty-repl-history-file
.node_repl_history
a.js
aead-vectors.js crypto: add support for chacha20-poly1305 for AEAD 2018-11-07 18:43:41 -05:00
altdocs.md tools,doc: fix version picker bug in html.js 2018-11-27 19:14:54 -08:00
assert-first-line.js assert: improve simple assert 2018-07-16 11:30:55 +02:00
assert-long-line.js assert: improve simple assert 2018-07-16 11:30:55 +02:00
async-error.js process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
baz.js
catch-stdout-error.js test: remove unused catch bindings 2018-11-06 10:59:18 -05:00
child_process_should_emit_error.js
child-process-echo-options.js child_process: handle undefined/null for fork() args 2018-11-01 19:41:33 -07:00
child-process-message-and-exit.js
child-process-persistent.js test: fix test-child-process-send-returns-boolean 2018-04-20 11:13:24 -07:00
child-process-spawn-node.js test: refactoring / cleanup on child-process tests 2020-03-24 11:21:00 -07:00
cjs-module-wrap.js module: increase code coverage of cjs loader 2019-07-15 20:46:56 -07:00
cjs-module-wrapper.js module: increase code coverage of cjs loader 2019-07-15 20:46:56 -07:00
cluster-preload-test.js test: replace string concatenation with template 2017-11-11 10:48:45 +01:00
cluster-preload.js
debugger-repeat-last.js
debugger-util-regression-fixture.js
define-global.js
deprecated-userland-class.js
deprecated-userland-function.js
deprecated-userland-subclass.js
deprecated.js lib: move DEP0028 to end of life 2019-01-10 09:00:17 -05:00
destroy-stdin.js
doc_inc_1.md
doc_inc_2.md
doc_with_backticks_in_headings.md doc: use _Static method_ instead of _Class Method_ 2020-08-09 07:02:28 -07:00
doc_with_yaml.md
document_with_links.md tools: add unified plugin changing links for html docs 2019-11-30 18:17:56 +01:00
document_with_special_heading.md tools,doc: allow page titles to contain inline code 2020-09-03 06:36:03 -07:00
echo-close-check.js test: add hijackStdout and hijackStderr 2017-06-09 13:57:24 -04:00
echo.js
elipses.txt
empty-with-bom.txt src: fix UB in InternalModuleReadFile() 2017-11-09 12:57:16 +01:00
empty.js
empty.txt
esm_loader_not_found_cjs_hint_bare.mjs esm: improve commonjs hint on module not found 2020-05-03 11:29:09 -07:00
exit.js
experimental.json esm: phase two of new esm implementation 2019-03-27 15:52:11 -04:00
exports-function-with-param.js
external-repl-module.js repl: check for NODE_REPL_EXTERNAL_MODULE 2019-10-11 12:33:40 -07:00
failcounter.js test: wrap countdown callback in common.mustCall 2018-02-16 18:32:59 +01:00
failmustcall1.js test: add mustCallAtLeast 2017-05-19 15:22:44 -04:00
failmustcall2.js test: add mustCallAtLeast 2017-05-19 15:22:44 -04:00
file-to-read-with-bom.txt
file-to-read-without-bom.txt
fixture.ini
foo
GH-892-request.js test: switch assertEqual arguments 2019-05-28 23:42:33 +03:00
GH-1899-output.js
google_ssl_hello.bin
guess-hash-seed.js test: refactor min() in test-hash-seed 2019-01-17 16:14:41 -08:00
icu-punycode-toascii.json test: separate the test fixtures between ICU and URL 2020-09-08 19:32:21 +09:00
inspector-global-function.js test: workaround for V8 8.1 inspector pause issue 2020-03-16 00:23:53 +00:00
intrinsic-mutation.js bootstrap: run preload prior to frozen-intrinsics 2019-08-20 09:49:48 -05:00
invalid.json
is-object.js
leakedGlobal.js test: do not export common.leakedGlobals() 2018-09-21 19:20:26 -07:00
linux-perf.js test,v8: skip less and stabilize test-linux-perf.js 2019-06-06 18:44:21 -04:00
loop.js src,doc,test: Fix common misspellings 2018-01-16 23:44:27 +01:00
module-loading-error.node
monkey-patch-run-main.js module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
net-fd-passing-receiver.js test: fix spelling in test case comments 2018-01-11 16:49:38 +01:00
no-wrapper.js lib: ensure --check flag works with --require 2018-04-04 17:31:45 -07:00
not-main-module.js test: remove string literals for strictEquals/notStrictEquals 2018-09-22 15:53:20 +02:00
old-repl-history-file-faulty.json repl: fix old history error handling 2017-06-30 19:21:23 +02:00
old-repl-history-file-obj.json repl: fix old history error handling 2017-06-30 19:21:23 +02:00
openssl_fips_disabled.cnf
openssl_fips_enabled.cnf
order_of_end_tags_5873.md doc: use _Static method_ instead of _Class Method_ 2020-08-09 07:02:28 -07:00
outside.txt wasi: introduce initial WASI support 2019-11-30 18:06:39 +01:00
overwrite-config-preload-module.js lib: guard inspector console using process var 2017-11-13 08:26:38 +01:00
parent-process-nonpersistent-fork.js test: test and docs for detached fork process 2018-11-28 11:14:37 -08:00
parent-process-nonpersistent.js
path-resolve.js
path.js
person-large.jpg http2: fix responses to long payload reqs 2018-04-28 18:17:28 +02:00
person.jpg
person.jpg.br benchmark,test: add brotli 2019-01-05 21:36:47 +01:00
person.jpg.gz
pkgexports.mjs module: unify package exports test for CJS and ESM 2019-07-31 13:33:46 -07:00
print A.js src: allows escaping NODE_OPTIONS with backslashes 2019-04-17 19:46:00 +02:00
print-10-lines.js test: change string concatenation to template 2017-11-11 10:58:09 +01:00
print-chars-from-buffer.js
print-chars.js
print-intrinsic-mutation-name.js bootstrap: run preload prior to frozen-intrinsics 2019-08-20 09:49:48 -05:00
printA.js
printB.js
printC.js
process-exit-code-cases.js test: refactor process/worker exitCode tests 2018-07-14 12:04:53 +02:00
pseudo-multimember-gzip.gz
pseudo-multimember-gzip.z
pss-vectors.json
readfile_pipe_test.txt test: update assert messages to show expected and actual values 2018-04-06 23:26:07 -07:00
recvfd.js
registerExt2.test
registerExt.hello.world
registerExt.test
repl-load-multiline.js repl: force editorMode in .load 2017-09-01 10:33:15 -04:00
repl-pretty-stack.js repl: remove internal frames from runtime errors 2017-10-11 14:51:41 -04:00
repl-tab-completion-nested-repls.js repl: improve completion 2019-12-15 16:24:00 +01:00
require-resolve.js lib: remove ERR_INVALID_OPT_VALUE and ERR_INVALID_OPT_VALUE_ENCODING 2020-09-11 17:54:42 +03:00
rsa-oaep-test-vectors.js crypto: add oaepLabel option 2019-09-13 16:58:41 +02:00
sample_document.md
sample.png
semicolon.js
shared-memory.wasm test: clean up wasm fixtures 2019-01-08 12:57:24 -06:00
shared-memory.wat test: clean up wasm fixtures 2019-01-08 12:57:24 -06:00
should_exit.js
simple.wasm test: clean up wasm fixtures 2019-01-08 12:57:24 -06:00
simple.wat test: clean up wasm fixtures 2019-01-08 12:57:24 -06:00
spawn_closed_stdio.py
test-error-first-line-offset.js test: replace CRLF by LF in a fixture 2017-07-25 21:50:44 +03:00
test-fs-readfile-error.js Revert "fs: Revert throw on invalid callbacks" 2018-02-26 23:18:12 +00:00
test-fs-stat-sync-overflow.js test: address nits and rename the corresponding fixture 2018-03-08 10:37:29 -06:00
test-resolution-inspect-brk-main.ext module: ignore resolution failures for inspect-brk 2019-12-04 23:30:25 -05:00
test-resolution-inspect-brk-resolver.js module: ignore resolution failures for inspect-brk 2019-12-04 23:30:25 -05:00
throws_error1.js
throws_error2.js
throws_error3.js
throws_error4.js
throws_error5.js
throws_error6.js
throws_error7.js
throws_error.js
tls-connect.js test: fix nits in test/fixtures/tls-connect.js 2019-07-30 14:02:19 -07:00
tls-session-ticket.txt
url-idna.js url: update IDNA handling 2017-06-06 23:33:56 -07:00
url-searchparams.js querystring: fix up lastPos usage 2017-07-12 12:12:48 +08:00
url-setter-tests-additional.js
url-tests-additional.js
utf8-bom-shebang-shebang.js lib: no need to strip BOM or shebang for scripts 2019-06-01 10:01:15 -04:00
utf8-bom.js
utf8-bom.json
utf8-shebang-bom.js lib: rework logic of stripping BOM+Shebang from commonjs 2019-05-26 13:04:29 -05:00
warnings.js
worker-data.cjs worker: add support for .cjs extension 2020-02-13 21:32:01 +01:00
worker-data.mjs worker: export workerData to ESM workers 2019-01-30 18:14:38 +01:00
worker-from-argv.js bootstrap: run preload prior to frozen-intrinsics 2019-08-20 09:49:48 -05:00
worker-script.mjs worker: rename to worker_threads 2018-06-06 19:44:15 +02:00
x1024.txt
x.txt