From 7bc4a10923a52a8b6c3e828ac2aee5c9bff8e3b2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 26 Nov 2021 01:31:26 -0800 Subject: [PATCH] chore(jest-runner): Add info regarding timers to forceExited message (#12083) --- CHANGELOG.md | 1 + packages/jest-runner/src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc106e5172cf..bc4241aefb77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### Chore & Maintenance +- `[jest-runner]` Add info regarding timers to forcedExit message([#12083](https://github.com/facebook/jest/pull/12083)) - `[*]` Replaced `substr` method with `substring` ([#12066](https://github.com/facebook/jest/pull/12066)) ### Performance diff --git a/packages/jest-runner/src/index.ts b/packages/jest-runner/src/index.ts index cd297c3696c5..5f6e17eeb615 100644 --- a/packages/jest-runner/src/index.ts +++ b/packages/jest-runner/src/index.ts @@ -273,7 +273,8 @@ export default class TestRunner { chalk.yellow( 'A worker process has failed to exit gracefully and has been force exited. ' + 'This is likely caused by tests leaking due to improper teardown. ' + - 'Try running with --detectOpenHandles to find leaks.', + 'Try running with --detectOpenHandles to find leaks. ' + + 'Active timers can also cause this, ensure that .unref() was called on them.', ), ); }