diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c875a9ca58c..e1932ef4557a 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)) - `[jest-cli]` Fix `testMatch` not working with negations ([#6648](https://github.com/facebook/jest/pull/6648)) ## 23.3.0 diff --git a/package.json b/package.json index 4fc03a421978..719fa9c832f9 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "istanbul-lib-coverage": "^1.0.0", "jasmine-reporters": "^2.2.0", "jest-junit": "^5.1.0", - "jest-silent-reporter": "^0.0.5", + "jest-simple-dot-reporter": "^1.0.2", "jquery": "^3.2.1", "karma": "^2.0.0", "karma-browserify": "^5.1.1", @@ -90,8 +90,8 @@ "postinstall": "opencollective postinstall && yarn build", "publish": "yarn build-clean && yarn build && lerna publish --silent", "test-ci-es5-build-in-browser": "karma start --single-run", - "test-ci": "yarn jest-coverage -i --reporters jest-silent-reporter jest-junit && yarn test-leak && node scripts/mapCoverage.js && codecov", - "test-ci-partial": "yarn jest -i --reporters jest-silent-reporter jest-junit", + "test-ci": "yarn jest-coverage -i --reporters jest-simple-dot-reporter jest-junit && yarn test-leak && node scripts/mapCoverage.js && codecov", + "test-ci-partial": "yarn jest -i --reporters jest-simple-dot-reporter jest-junit", "test-pretty-format-perf": "node packages/pretty-format/perf/test.js", "test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl", "test": "yarn typecheck && yarn lint && yarn jest", 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); } }; diff --git a/packages/jest-runtime/src/__tests__/script_transformer.test.js b/packages/jest-runtime/src/__tests__/script_transformer.test.js index a9227914c534..cd867cf1deba 100644 --- a/packages/jest-runtime/src/__tests__/script_transformer.test.js +++ b/packages/jest-runtime/src/__tests__/script_transformer.test.js @@ -394,7 +394,7 @@ describe('ScriptTransformer', () => { const content = 'var x = 1;\n' + '//# sourceMappingURL=data:application/json;base64,' + - new Buffer(sourceMap).toString('base64'); + Buffer.from(sourceMap).toString('base64'); require('preprocessor-with-sourcemaps').process.mockReturnValue(content); diff --git a/packages/jest-snapshot/src/State.js b/packages/jest-snapshot/src/State.js index d93a35b47dcb..3d5bbc3f2ca5 100644 --- a/packages/jest-snapshot/src/State.js +++ b/packages/jest-snapshot/src/State.js @@ -93,7 +93,9 @@ export default class SnapshotState { const lines = getStackTraceLines(error.stack); const frame = getTopFrame(lines); if (!frame) { - throw new Error("Jest: Couln't infer stack frame for inline snapshot."); + throw new Error( + "Jest: Couldn't infer stack frame for inline snapshot.", + ); } this._inlineSnapshots.push({ frame, diff --git a/yarn.lock b/yarn.lock index ed9723381c48..632c10d86428 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2040,14 +2040,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - character-entities-legacy@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.1.tgz#f40779df1a101872bb510a3d295e1fccf147202f" @@ -6171,12 +6163,9 @@ jest-resolve@^22.4.2: browser-resolve "^1.11.2" chalk "^2.0.1" -jest-silent-reporter@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/jest-silent-reporter/-/jest-silent-reporter-0.0.5.tgz#14139b7a991b7bcca880dd8a69c33a91723a8f1f" - dependencies: - chalk "^2.3.1" - jest-util "^23.0.0" +jest-simple-dot-reporter@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jest-simple-dot-reporter/-/jest-simple-dot-reporter-1.0.2.tgz#3af57740a1a4e63358d1718c9dad2aefe6196bbc" jest-snapshot@^22.4.0: version "22.4.3"