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)));