Merge pull request #16495 from agentbellnorm/fix-addons-test-util
[TechDocs] Fix addons test util
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ReactElement, Fragment } from 'react';
|
||||
import React, { ReactElement } from 'react';
|
||||
|
||||
// Shadow DOM support for the simple and complete DOM testing utilities
|
||||
// https://github.com/testing-library/dom-testing-library/issues/742#issuecomment-674987855
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user