1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-28 01:59:06 -05:00
denoland-deno/cli/tests/unit_node/testdata
Marvin Hagemeister 8c051dbd1a
fix(ext/node): add missing _preloadModules hook (#18447)
This internal node hook is used by libraries such as `ts-node` when used
as a require hook `node -r ts-node/register`. That combination is often
used with test frameworks like `mocha` or `jasmine`.

We had a reference to `Module._preloadModules` in our code, but the
implementation was missing. While fixing this I also noticed that the
`fakeParent` module that we create internally always threw because of
the `pathDirname` check on the module id in the constructor of `Mdoule`.
So this code path was probably broken for a while.

```txt
✖ ERROR: Error: Empty filepath.
    at pathDirname (ext:deno_node/01_require.js:245:11)
    at new Module (ext:deno_node/01_require.js:446:15)
    at Function.Module._resolveFilename (ext:deno_node/01_require.js:754:28)
    at Function.resolve (ext:deno_node/01_require.js:1015:19)
```
2023-03-27 21:54:22 +02:00
..
node_modules/foo test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
add_global_property.js fix(ext/node): add missing _preloadModules hook (#18447) 2023-03-27 21:54:22 +02:00
binary_stdio.js test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
child_process_unref.js test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
exec_file_text_error.js test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
exec_file_text_output.js test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
infinite_loop.js test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
process_exit.ts test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
process_exit2.ts test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
process_stdin.ts test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
process_stdin_dummy.txt test: add unit tests from std/node (#17794) 2023-02-16 14:30:14 +01:00
rsa_private.pem perf: use ops for node:crypto ciphers (#17819) 2023-02-20 22:22:28 +05:30
rsa_public.pem perf: use ops for node:crypto ciphers (#17819) 2023-02-20 22:22:28 +05:30