From 140c5177627c10658bb55956d144cfa61ef466fd Mon Sep 17 00:00:00 2001 From: atanasster Date: Sun, 9 May 2021 17:25:05 +0300 Subject: [PATCH] fix: hide coverage if no covered files --- ui/blocks/src/TestsCoverage/BaseTestsCoverage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/blocks/src/TestsCoverage/BaseTestsCoverage.tsx b/ui/blocks/src/TestsCoverage/BaseTestsCoverage.tsx index 3ac734e8a..2847b11b9 100644 --- a/ui/blocks/src/TestsCoverage/BaseTestsCoverage.tsx +++ b/ui/blocks/src/TestsCoverage/BaseTestsCoverage.tsx @@ -164,7 +164,10 @@ export const BaseTestsCoverage: FC = ({ : undefined, [component?.jest?.coverage], ); - if (!component?.jest) { + if ( + !component?.jest?.coverage || + !Object.keys(component.jest.coverage).length + ) { return null; } return (