mirror of
https://github.com/denoland/deno.git
synced 2024-12-13 02:52:54 -05:00
d0efd040c7
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()`](8fa7fc9a9c/src/index.ts (L19)
). That function cannot be found anywhere in their documentation, but exists at runtime. See6a6b3c5402/lib/internal/bootstrap/node.js (L172)
This doesn't yet make `node-tap` work, but gets us one step closer.
10 lines
319 B
TypeScript
10 lines
319 B
TypeScript
import process from "node:process";
|
|
|
|
//deno-lint-ignore no-undef
|
|
// @ts-ignore - Node typings don't even have this because it's
|
|
// been deprecated for 4 years. But it's used in `signal-exit`,
|
|
// which in turn is used in `node-tap`.
|
|
process.reallyExit = function () {
|
|
console.info("really exited");
|
|
};
|
|
process.exit();
|