refactor: disable naming-convenction rule (#51685)

This commit is contained in:
Muhammed Mustafa
2023-09-30 16:23:39 +03:00
committed by GitHub
parent bbe1f46d6e
commit 49b728d31b
19 changed files with 4 additions and 79 deletions

View File

@@ -27,8 +27,7 @@ function getComponentNameAndProps(
pathname: string,
pageContext?: { challengeMeta?: { block?: string; superBlock?: string } }
): NameAndProps {
// eslint-disable-next-line testing-library/render-result-naming-convention
const shallow = ShallowRenderer.createRenderer();
const utils = ShallowRenderer.createRenderer();
const LayoutReactComponent = layoutSelector({
element: { type: elementType, props: {}, key: '' },
props: {
@@ -38,8 +37,8 @@ function getComponentNameAndProps(
pageContext
}
});
shallow.render(<Provider store={store}>{LayoutReactComponent}</Provider>);
const view = shallow.getRenderOutput();
utils.render(<Provider store={store}>{LayoutReactComponent}</Provider>);
const view = utils.getRenderOutput();
return {
props: view.props.children.props as Record<string, unknown>,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment