0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/tests
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
..
integration feat(bench): add --no-run flag (#18433) 2023-03-26 14:55:58 +00:00
node_compat refactor(ext/node): Use Deno.inspect (#17960) 2023-03-23 10:01:07 -04:00
testdata feat(bench): add --no-run flag (#18433) 2023-03-26 14:55:58 +00:00
unit chore(ext/kv): add limits (#18415) 2023-03-25 15:29:36 +08:00
unit_node fix(ext/node): add missing _preloadModules hook (#18447) 2023-03-27 21:54:22 +02:00
integration_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00