From c727af1d253606517803cab78939416bdf63126b Mon Sep 17 00:00:00 2001 From: David Luksch Date: Tue, 28 Jul 2020 19:25:12 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Simen Bekkhus --- docs/Configuration.md | 2 +- packages/jest-reporters/src/get_result_header.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index c193e09f8ea7..a500132032c2 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -804,7 +804,7 @@ jest.setTimeout(10000); // in milliseconds Default: `5` -A number of seconds after which a test is considered as slow and reported as such in the results. +The number of seconds after which a test is considered as slow and reported as such in the results. ### `snapshotResolver` [string] diff --git a/packages/jest-reporters/src/get_result_header.ts b/packages/jest-reporters/src/get_result_header.ts index e7cb69e73d13..fa2aca5f3428 100644 --- a/packages/jest-reporters/src/get_result_header.ts +++ b/packages/jest-reporters/src/get_result_header.ts @@ -44,7 +44,7 @@ export default ( const testDetail = []; - if (result.perfStats && result.perfStats.slow) { + if (result.perfStats?.slow) { const runTime = (result.perfStats.end - result.perfStats.start) / 1000; testDetail.push(LONG_TEST_COLOR(formatTime(runTime, 0)));