From ae990f0e61923362ceb6db17350d0c385a2d1382 Mon Sep 17 00:00:00 2001 From: Vladimir Razuvaev Date: Thu, 9 Sep 2021 17:36:49 +0700 Subject: [PATCH] fix: return correct type from process.send stub (#11799) --- CHANGELOG.md | 1 + packages/jest-util/src/createProcessObject.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ee07a674a3..0d115bde1cf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - `[@jest/reporters]` Use async transform if available to transform files with no coverage ([#11852](https://github.com/facebook/jest/pull/11852)) +- `[jest-util]` Return correct value from `process.send` stub ([#11799](https://github.com/facebook/jest/pull/11799)) ### Chore & Maintenance diff --git a/packages/jest-util/src/createProcessObject.ts b/packages/jest-util/src/createProcessObject.ts index 83d8774ad070..462f3f812ce7 100644 --- a/packages/jest-util/src/createProcessObject.ts +++ b/packages/jest-util/src/createProcessObject.ts @@ -110,7 +110,7 @@ export default function (): NodeJS.Process { } newProcess.env = createProcessEnv(); - newProcess.send = () => {}; + newProcess.send = () => true; Object.defineProperty(newProcess, 'domain', { get() {