Skip to content

Commit

Permalink
Merge pull request #30001 from storybookjs/valentin/fix-undefined-issue
Browse files Browse the repository at this point in the history
Addon Test: Filter out falsy test results in TestProviderRender
  • Loading branch information
valentinpalkovic authored Dec 10, 2024
2 parents cf80d5c + 7141d6d commit f4a084d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions code/addons/test/src/components/TestProviderRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export const TestProviderRender: FC<

return state.details?.testResults?.flatMap((result) =>
result.results
.filter(Boolean)
.filter((r) => !entryId || r.storyId === entryId || r.storyId?.startsWith(`${entryId}-`))
.map((r) => r.reports.find((report) => report.type === 'a11y'))
);
Expand Down

0 comments on commit f4a084d

Please sign in to comment.