From 99ad2233c1b9878833e1817041527895de0f04a5 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 5a10fb21337a..877cea6d9262 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -783,7 +783,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 4b7d8fe51793..1b003f3b8da3 100644 --- a/packages/jest-reporters/src/get_result_header.ts +++ b/packages/jest-reporters/src/get_result_header.ts @@ -43,7 +43,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(runTime + 's'));