From e960dcb31ae1d347dc460495c364c506f2f05152 Mon Sep 17 00:00:00 2001 From: lorenzourb Date: Wed, 21 Aug 2024 10:56:56 +0200 Subject: [PATCH] fix: added chain operator to avoid empty reports when an annotation is wrongly set e.g. test.info.annotations.push(' //') --- packages/html-reporter/src/filter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/html-reporter/src/filter.ts b/packages/html-reporter/src/filter.ts index 280c9a566b..61a26193cb 100644 --- a/packages/html-reporter/src/filter.ts +++ b/packages/html-reporter/src/filter.ts @@ -176,7 +176,7 @@ function cacheSearchValues(test: TestCaseSummary & { [searchValuesSymbol]?: Sear line: String(test.location.line), column: String(test.location.column), labels: test.tags.map(tag => tag.toLowerCase()), - annotations: test.annotations.map(a => a.type.toLowerCase() + '=' + a.description?.toLocaleLowerCase()) + annotations: test.annotations.map(a => a.type?.toLowerCase() + '=' + a.description?.toLocaleLowerCase()) }; test[searchValuesSymbol] = searchValues; return searchValues;