summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/process_test.ts
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.
2024-02-07chore(cli): Use @test_util for relative path for unit tests (#22327)Matt Mastracci
This removes the majority of `../../../../../../test_util` relative imports from the codebase, allowing us to move this code more easily in the future.
2024-02-01fix(node): add `ppid` getter for `node:process` (#22167)Yusuke Tanaka
This commit adds `ppid` getter for `node:process` to improve Node compatibility one step further. There is one problem though, which is that `Deno.ppid`, which `process.ppid` internally calls, is actually of type `bigint` although it's supposed to be `number`. I filed an issue for this (#22166). For the time being, explciit type conversion from `bigint` to `number` is applied to match the Node.js behavior.
2024-01-24feat: `Deno.{stdin,stdout,stderr}.isTerminal()`, deprecate `Deno.isatty()` ↵Asher Gomez
(#22011) This change: 1. Implements `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()` and `Deno.stderr.isTerminal()`. 2. Deprecates `Deno.isatty()` for removal in Deno v2, in favour of the above instance methods. 3. Replaces use of `Deno.isatty()` with the above instance methods. Related #21995 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-02fix(node): setting process.exitCode should change exit code of process (#21429)David Sherret
2023-12-02chore: update std to 0.208.0 (#21318)Asher Gomez
Re-attempt at #21284. I was more thorough this time. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-01fix(ext/node): add stubbed process.report (#21373)Daniel Mizerski
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-11-22refactor: replace `deferred()` from `std/async` with ↵Asher Gomez
`Promise.withResolvers()` (#21234) Closes #21041 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-22Revert "chore: update to `std@0.207.0` (#21284)" (#21295)Bartek Iwańczuk
This reverts commit 20aa0796e6ff7651cdfce4d0292bdb11da5dfe2e. `main` has been failing consistenly on `kv_undelivered_test` and `serve_test` after this upgrade.
2023-11-22chore: update to `std@0.207.0` (#21284)Asher Gomez
Closes #21002
2023-11-20fix(ext/node): handle closing process.stdin more than once (#21267)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21112 Aligns more towards what Node.js does. Closing stdin more than once is a nop.
2023-11-10fix(ext/node): implement process.geteuid (#21151)Divy Srivastava
Fixes #21097
2023-10-28Revert "chore: update deno_std submodule (#20994)" (#21001)Bartek Iwańczuk
This reverts commit 6e2abb2b13af5dff5d631fb1bc0c279c49ebd066.
2023-10-27chore: update deno_std submodule (#20994)Bartek Iwańczuk
2023-10-18fix(ext/node): process.argv0 (#20925)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/20924
2023-10-05fix(ext/node): implement uv.errname (#20785)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20617
2023-08-29fix(ext/node): fix argv[1] in Worker (#20305)Yoshiya Hinosawa
2023-08-04fix(node): polyfill process.title (#20044)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19777
2023-06-02fix(node): don't close stdio streams (#19256)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19255 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
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-03-25feat(test): print pending tests on sigint (#18246)Nayeem Rahman
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>