summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/testdata
AgeCommit message (Collapse)Author
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.
2023-12-03fix(ext/node): sign with PEM private keys (#21287)Divy Srivastava
Add support for signing with a RSA PEM private key: `pkcs8` and `pkcs1`. Fixes https://github.com/denoland/deno/issues/18972 Ref #21124 Verified fix with `npm:sshpk`. Unverfied but fixes `npm:google-auth-library`, `npm:web-push` & `oracle/oci-typescript-sdk` --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-06-24fix(ext/node): support brotli APIs (#19223)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-16fix(ext/node): remove fromFileUrl from "node:path" (#19504)Ryan Clements
2023-06-15fix(node): Worker constructor doesn't check type: module of package.json ↵Vedant Pandey
(#19480)
2023-06-02fix(node): map stdio [0, 1, 2] to "inherit" (#19352)Marvin Hagemeister
<!-- Before submitting a PR, please read https://deno.com/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> Internally, `node-tap` spawns a child process with `stdio: [0, 1, 2]`. Whilst we don't support passing fd numbers as an argument so far, it turns out that `[0, 1, 2]` is equivalent to `"inherit"` which we already support. See: https://nodejs.org/api/child_process.html#optionsstdio Mapping it to `"inherit"` is fine for us and gets us one step closer in getting `node-tap` working. I'm now at the stage where already the coverage table is shown 🎉
2023-05-31fix(node): add missing process.reallyExit method (#19326)Marvin Hagemeister
This PR adds the missing `process.reallyExit()` method to node's `process` object. Was [pinged on twitter](https://twitter.com/biwanczuk/status/1663326659787862017) regarding running the `fastify` test suite in node. They use `node-tap` which has been around arguably the longest of the test frameworks and relies on a couple of old APIs. They have `signal-exit` as a dependency which in turn [makes use of `process.reallyExit()`](https://github.com/tapjs/signal-exit/blob/8fa7fc9a9c63f559af43d292b7eb727901775507/src/index.ts#L19). That function cannot be found anywhere in their documentation, but exists at runtime. See https://github.com/nodejs/node/blob/6a6b3c54022104cc110ab09044a2a0cecb8988e7/lib/internal/bootstrap/node.js#L172 This doesn't yet make `node-tap` work, but gets us one step closer.
2023-05-23fix(ext/node): add basic node:worker_threads support (#19192)Yoshiya Hinosawa
This PR restores `node:worker_threads` implementation and test cases from [`std@0.175.0/node`](https://github.com/denoland/deno_std/blob/0.175.0/node/worker_threads.ts). --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-18fix(node): support passing parent stdio streams (#19171)Marvin Hagemeister
This is a bit bare bones but gets `npm-run-all` working. For full stdio compatibility with node more work is needed which is probably better done in follow up PRs. Fixes #19159
2023-05-13chore: fix & update node compat config (#19106)Yoshiya Hinosawa
2023-03-27fix(ext/node): add missing _preloadModules hook (#18447)Marvin Hagemeister
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-02-20perf: use ops for node:crypto ciphers (#17819)Divy Srivastava
Towards #17809
2023-02-16test: add unit tests from std/node (#17794)Bartek Iwańczuk
Adds two test files: "cli/tests/unit_node/process_test.ts" and "cli/tests/unit_node/child_process_test.ts" --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>