node/test/fixtures
Guy Bedford 598787d854
module: fix main resolution and not found updates
This simplifies the top-level load when ES modules are enabled
as we can entirely delegate the module resolver, which will hand
over to CommonJS where appropriate.

All not found errors are made consistent to throw during resolve
and have the MODULE_NOT_FOUND code.

Includes the test case from https://github.com/nodejs/node/pull/15736.

Fixes: https://github.com/nodejs/node/issues/15732
PR-URL: https://github.com/nodejs/node/pull/16147
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-23 17:23:01 -04:00
..
0-dns crypto: fix Node_SignFinal 2017-09-20 09:32:43 -07:00
b meta: restore original copyright header 2017-03-10 11:23:48 -08:00
clustered-server test: refactor test-debug-signal-cluster 2016-08-29 18:53:29 -07:00
cycles meta: restore original copyright header 2017-03-10 11:23:48 -08:00
empty
es-module-loaders module: fix main resolution and not found updates 2017-10-23 17:23:01 -04:00
es-module-require-cache module: Allow runMain to be ESM 2017-09-12 03:18:35 +02:00
es-module-url module: Allow runMain to be ESM 2017-09-12 03:18:35 +02:00
GH-7131 lib: include cached modules in module.children 2017-07-24 17:45:27 +02:00
global meta: restore original copyright header 2017-03-10 11:23:48 -08:00
internal-modules iojs: introduce internal modules 2015-03-25 22:12:18 +03:00
json-with-directory-name-module meta: restore original copyright header 2017-03-10 11:23:48 -08:00
keys tls: multiple PFX in createSecureContext 2017-09-12 03:18:36 +02:00
module-load-order meta: restore original copyright header 2017-03-10 11:23:48 -08:00
module-require test: use const for all require() calls 2017-01-02 18:28:18 -05:00
module-require-depth module: cache stat() results more aggressively 2016-01-12 12:35:11 -08:00
module-require-symlink test: do not write fixture in test-require-symlink 2017-09-20 07:54:48 -07:00
nested-index meta: restore original copyright header 2017-03-10 11:23:48 -08:00
node_modules meta: restore original copyright header 2017-03-10 11:23:48 -08:00
packages meta: restore original copyright header 2017-03-10 11:23:48 -08:00
repl-folder-extensions/foo.js repl: include folder extensions in autocomplete 2017-08-13 21:43:35 +02:00
require-bin module: fix regression in require ../ 2014-12-11 10:18:00 +01:00
syntax src: wrap source before doing syntax check 2015-10-29 13:08:32 -05:00
test-init-index meta: restore original copyright header 2017-03-10 11:23:48 -08:00
test-init-native meta: restore original copyright header 2017-03-10 11:23:48 -08:00
test-module-loading-globalpaths test: add test for loading from global folders 2017-03-11 22:08:18 +00:00
uncaught-exceptions util: add callbackify 2017-07-18 19:56:14 +02:00
.empty-hidden-repl-history-file repl: support hidden history file on Windows 2017-04-20 13:18:42 +02:00
.empty-repl-history-file repl: Fixed node repl history edge case. 2015-12-22 13:29:28 -05:00
.node_repl_history test: add tests for persistent repl history 2015-08-04 11:56:18 -07:00
a.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
agent.crt
agent.key
alice.crt
baz.js test: update test-repl-require for local paths 2016-03-29 21:39:26 +02:00
catch-stdout-error.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
cert.pem
child-process-message-and-exit.js child process: fix processes with IPC channel don't emit 'close' 2012-08-30 16:13:27 +02:00
child-process-persistent.js test: enable linting for tests 2015-05-19 21:21:27 +02:00
child-process-spawn-node.js test: use const for all require() calls 2017-01-02 18:28:18 -05:00
child_process_should_emit_error.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
cluster-preload-test.js test: use const for all require() calls 2017-01-02 18:28:18 -05:00
cluster-preload.js test: refactor cluster-preload.js 2017-01-10 16:57:48 -05:00
create-file.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
crypto-timing-safe-equal-benchmark-func.js test: make crypto.timingSafeEqual test less flaky 2016-09-11 21:06:10 -07:00
debugger-repeat-last.js debugger: run last command on presssing enter 2016-04-14 10:53:07 -07:00
debugger-util-regression-fixture.js node_contextify: do not incept debug context 2016-02-05 15:40:56 -08:00
define-global.js node: allow preload modules with -i 2016-01-18 10:57:45 -06:00
deprecated-userland-class.js util: fix deprecated class prototype 2016-08-17 18:27:22 -07:00
deprecated-userland-function.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
deprecated-userland-subclass.js util: support classes in util.deprecate() 2016-08-04 11:44:40 -04:00
deprecated.js util: Remove p, has been deprecated for years 2015-10-19 20:52:56 +02:00
destroy-stdin.js test: new test, verify that we don't close and reuse fd 0 2011-12-06 22:02:26 +01:00
dherror.pem tls, crypto: add DHE support 2014-08-29 00:36:48 +04:00
doc_inc_1.md tools: make sure doctool anchors respect includes 2016-05-26 00:49:34 +02:00
doc_inc_2.md tools: make sure doctool anchors respect includes 2016-05-26 00:49:34 +02:00
doc_with_includes.md tools: make sure doctool anchors respect includes 2016-05-26 00:49:34 +02:00
doc_with_yaml.md doc: change broken fg(1) links to fg(1p) 2017-02-24 02:43:25 +01:00
echo-close-check.js test: add hijackStdout and hijackStderr 2017-06-10 17:54:41 +02:00
echo.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
elipses.txt
empty.js test: add --debug-brk regression test 2012-02-07 23:42:38 +01:00
empty.txt
exit.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
exports-function-with-param.js test: add test for debugging one line files 2015-12-16 10:08:43 -05: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 test: ensure stream preprocessing order 2016-07-27 13:56:55 +02:00
file-to-read-without-bom.txt test: ensure stream preprocessing order 2016-07-27 13:56:55 +02:00
fixture.ini
foafssl.crt
foafssl.key
foo
GH-892-request.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
GH-1899-output.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
google_ssl_hello.bin tls: add options argument to createSecurePair 2015-10-17 11:53:45 -04:00
guess-hash-seed.js test: verify hash seed uniqueness 2017-07-10 23:10:12 +01:00
inspector-global-function.js test: move inspector tests to parallel/sequential 2017-10-17 23:35:41 -07:00
invalid.json module: add filename to require() json errors 2012-07-06 15:26:41 -07:00
is-object.js test: add known issue test for #7788 2016-07-20 13:01:42 -04:00
loop.js inspector: introduce a smoke test 2016-09-19 12:40:16 -07:00
module-loading-error.node process: show detailed error message in process.dlopen() 2012-03-06 01:34:39 +01:00
msca.pem
multi-alice.crt tls: parsing multiple values of a key in ssl certificate 2012-03-10 23:43:16 +09:00
net-fd-passing-receiver.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
not-main-module.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
old-repl-history-file-faulty.json repl: fix old history error handling 2017-07-24 10:58:22 -04:00
old-repl-history-file-obj.json repl: fix old history error handling 2017-07-24 10:58:22 -04:00
old-repl-history-file.json test: add tests for persistent repl history 2015-08-04 11:56:18 -07:00
openssl_fips_disabled.cnf crypto: Improve control of FIPS mode 2016-02-25 15:06:41 -05:00
openssl_fips_enabled.cnf crypto: Improve control of FIPS mode 2016-02-25 15:06:41 -05:00
order_of_end_tags_5873.md tools: add tests for the doctool 2016-04-29 00:45:49 +02:00
parent-process-nonpersistent.js test: use const for all require() calls 2017-01-02 18:28:18 -05:00
pass-cert.pem test: update an expired certificate 2011-11-27 02:05:24 +09:00
pass-csr.pem
pass-key.pem test: stronger crypto in test fixtures 2015-11-13 10:22:42 -08:00
path-resolve.js test: use const for all require() calls 2017-01-02 18:28:18 -05:00
path.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
person.jpg test: strip non-free icc profile from person.jpg 2016-03-21 23:20:43 -07:00
person.jpg.gz test: strip non-free icc profile from person.jpg 2016-03-21 23:20:43 -07:00
print-10-lines.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
print-chars-from-buffer.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
print-chars.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
printA.js src: add -r/--require flags for preloading modules 2015-03-19 21:42:16 +11:00
printB.js src: add -r/--require flags for preloading modules 2015-03-19 21:42:16 +11:00
printC.js src: add -r/--require flags for preloading modules 2015-03-19 21:42:16 +11:00
pseudo-multimember-gzip.gz zlib: Fix handling of gzip magic bytes mid-file 2016-03-23 13:04:19 -04:00
pseudo-multimember-gzip.z zlib: Fix handling of gzip magic bytes mid-file 2016-03-23 13:04:19 -04:00
pss-vectors.json crypto: add sign/verify support for RSASSA-PSS 2017-04-01 13:27:52 +02:00
raw-key.pem doc: rework tls for accuracy and clarity 2016-12-12 08:15:58 -08:00
recvfd.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
registerExt.hello.world
registerExt.test
registerExt2.test
repl-load-multiline.js repl: force editorMode in .load 2017-09-12 03:18:21 +02:00
sample.png
sample_document.md tools: add tests for the doctool 2016-04-29 00:45:49 +02:00
semicolon.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
should_exit.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
spawn_closed_stdio.py src: ensure that fd 0-2 are valid on windows 2017-03-20 20:48:14 +01:00
spkac.fail crypto: add SPKAC support 2013-10-16 09:43:19 -07:00
spkac.pem crypto: add SPKAC support 2013-10-16 09:43:19 -07:00
spkac.valid crypto: add SPKAC support 2013-10-16 09:43:19 -07:00
test-error-first-line-offset.js test: replace CRLF by LF in a fixture 2017-07-27 23:30:36 +02:00
test-fs-readfile-error.js fs: Revert throw on invalid callbacks 2017-05-20 10:21:34 -04:00
test-regress-GH-4015.js test: use const for all require() calls 2017-01-02 18:28:18 -05:00
test_bad_rsa_privkey.pem crypto: check for OpenSSL errors when signing 2015-08-17 21:38:12 -07:00
test_ca.pem
test_cert.pem
test_cert.pfx test: stronger crypto in test fixtures 2015-11-13 10:22:42 -08:00
test_dsa_params.pem test: add DSA sign/verify crypto tests 2011-11-22 16:01:07 +01:00
test_dsa_privkey.pem test: stronger crypto in test fixtures 2015-11-13 10:22:42 -08:00
test_dsa_privkey_encrypted.pem test: stronger crypto in test fixtures 2015-11-13 10:22:42 -08:00
test_dsa_pubkey.pem test: stronger crypto in test fixtures 2015-11-13 10:22:42 -08:00
test_key.pem
test_rsa_privkey.pem
test_rsa_privkey_2.pem
test_rsa_privkey_encrypted.pem test: stronger crypto in test fixtures 2015-11-13 10:22:42 -08:00
test_rsa_pubkey.pem
test_rsa_pubkey_2.pem
throws_error.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throws_error1.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throws_error2.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throws_error3.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throws_error4.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throws_error5.js src: fix buffer overflow for long exception lines 2015-09-06 21:38:07 +10:00
throws_error6.js src: use standard conform snprintf on windows 2015-09-06 21:38:08 +10:00
throws_error7.js src: don't print garbage errors 2015-12-05 11:15:49 -05:00
tls-connect.js test: continue normalizing fixtures use 2017-09-12 03:18:34 +02:00
tls-session-ticket.txt tls: expose SSL_CTX_set_timeout via tls.createServer 2013-03-26 01:37:49 +01:00
url-idna.js url: update IDNA handling 2017-06-07 13:32:25 -07:00
url-searchparams.js querystring: fix up lastPos usage 2017-07-19 15:02:26 -04:00
url-setter-tests-additional.js url: enforce valid UTF-8 in WHATWG parser 2017-02-28 18:39:20 -08:00
url-setter-tests.js test: add comments for whatwg-url tests 2017-07-24 10:58:24 -04:00
url-tests-additional.js url: enforce valid UTF-8 in WHATWG parser 2017-02-28 18:39:20 -08:00
url-tests.js url: fix port overflow checking 2017-10-17 21:06:55 -07:00
url-toascii.js test: add comments for whatwg-url tests 2017-07-24 10:58:24 -04:00
utf8-bom.js
utf8-bom.json
vm-run-in-debug-context.js vm: fix crash on fatal error in debug context 2015-03-22 20:07:49 +01:00
warnings.js process: add 'warning' event and process.emitWarning() 2016-03-24 13:19:11 -07:00
x.txt
x1024.txt test: fixture for streams2 testing 2012-12-13 17:00:28 -08:00