avoid wrapping addons when rendering them in a test setting, the levels of nesting is very sensitive due to TechDocsReaderPage.tsx, this will result in a more realistic component tree

Signed-off-by: Morgan Bentell <mbentell@spotify.com>
This commit is contained in:
Morgan Bentell
2023-02-21 13:32:45 +01:00
parent 084472316c
commit 3ab1b8fcae
@@ -236,9 +236,9 @@ export class TechDocsAddonTester {
element={<TechDocsReaderPage />}
>
<TechDocsAddons>
{this.addons.map((addon, index) => (
<Fragment key={index}>{addon}</Fragment>
))}
{this.addons.map((addon, index) =>
React.cloneElement(addon, { key: index }),
)}
</TechDocsAddons>
</Route>
</FlatRoutes>