From 3ab1b8fcae463674dc2c56640628ab224e44a6a1 Mon Sep 17 00:00:00 2001 From: Morgan Bentell Date: Tue, 21 Feb 2023 13:32:45 +0100 Subject: [PATCH] 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 --- plugins/techdocs-addons-test-utils/src/test-utils.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/techdocs-addons-test-utils/src/test-utils.tsx b/plugins/techdocs-addons-test-utils/src/test-utils.tsx index 0d65e7e51e..53da924db5 100644 --- a/plugins/techdocs-addons-test-utils/src/test-utils.tsx +++ b/plugins/techdocs-addons-test-utils/src/test-utils.tsx @@ -236,9 +236,9 @@ export class TechDocsAddonTester { element={} > - {this.addons.map((addon, index) => ( - {addon} - ))} + {this.addons.map((addon, index) => + React.cloneElement(addon, { key: index }), + )}