From 7a0b1d7219364cc3548370aad93266b944a82c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Jim=C3=A9nez=20Es=C3=BAn?= Date: Sat, 7 Jul 2018 21:56:06 +0100 Subject: [PATCH] Use stdout when requested to print the configuration (#6447) --- CHANGELOG.md | 1 + packages/jest-cli/src/cli/index.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db8c982b0a69..57ba8837e010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - `[jest-runner]` Force parallel runs for watch mode, to avoid TTY freeze ([#6647](https://github.com/facebook/jest/pull/6647)) - `[jest-cli]` properly reprint resolver errors in watch mode ([#6407](https://github.com/facebook/jest/pull/6407)) +- `[jest-cli]` Write configuration to stdout when the option was explicitly passed to Jest ([#6447](https://github.com/facebook/jest/pull/6447)) ## 23.3.0 diff --git a/packages/jest-cli/src/cli/index.js b/packages/jest-cli/src/cli/index.js index ad44745032cb..534bf25de5ad 100644 --- a/packages/jest-cli/src/cli/index.js +++ b/packages/jest-cli/src/cli/index.js @@ -205,10 +205,13 @@ const printDebugInfoAndExitIfNeeded = ( configs, outputStream, ) => { - if (argv.debug || argv.showConfig) { + if (argv.debug) { logDebugMessages(globalConfig, configs, outputStream); + return; } + if (argv.showConfig) { + logDebugMessages(globalConfig, configs, process.stdout); exit(0); } };