Skip to content

Commit

Permalink
fix: multiple test files check
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 10, 2021
1 parent d522a0f commit e06b176
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/blocks/src/TestsResults/TestsResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ export const TestsResults: FC<TestsResultsProps> = ({
}) => {
const props = useCustomProps<TestsResultsProps>('tests_results', rest);
const component = useStoryComponent({ id, name });

if (
!component?.jest?.results.length ||
!component.jest.results[0].testResults.length
!component.jest.results.reduce(
(acc, { testResults }) => acc + testResults.length,
0,
)
) {
return null;
}
Expand Down

0 comments on commit e06b176

Please sign in to comment.