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