Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return correct type from process.send stub
The `process.send` stub created by Jest always returns `undefined` but Node actually always returns `boolean` value from `process.send` (see types [1](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7f660501fbf2e57f885cabf9723aa57c8bfe4f47/types/node/process.d.ts#L1268-L1275) and [2](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7f660501fbf2e57f885cabf9723aa57c8bfe4f47/types/node/child_process.d.ts#L447-L449), as well as [Node docs](https://nodejs.org/dist/latest-v14.x/docs/api/process.html#process_process_send_message_sendhandle_options_callback)) By default, it returns `true` and only returns `false` when the IPC message is buffered or the child process had already exited, see [related docs on child_process](https://nodejs.org/dist/latest-v14.x/docs/api/child_process.html#child_process_subprocess_send_message_sendhandle_options_callback)
- Loading branch information