Skip to content

Commit c2af57a

Browse files
committed
refactor(tests): format renderComponent function for improved readability
1 parent 6ee7298 commit c2af57a

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

src/pages-and-resources/discussions/app-config-form/apps/shared/InContextDiscussionFields.test.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ const defaultProps = {
1313
},
1414
};
1515

16-
const renderComponent = (props = {}) => render(
17-
<IntlProvider locale="en">
18-
<Formik initialValues={defaultProps.values} onSubmit={jest.fn()}>
19-
<Form>
20-
<InContextDiscussionFields {...defaultProps} {...props} />
21-
</Form>
22-
</Formik>
23-
</IntlProvider>,
24-
);
16+
const renderComponent = (props = {}) =>
17+
render(
18+
<IntlProvider locale="en">
19+
<Formik initialValues={defaultProps.values} onSubmit={jest.fn()}>
20+
<Form>
21+
<InContextDiscussionFields {...defaultProps} {...props} />
22+
</Form>
23+
</Formik>
24+
</IntlProvider>,
25+
);
2526

2627
describe('InContextDiscussionFields', () => {
2728
beforeEach(() => {
@@ -48,4 +49,4 @@ describe('InContextDiscussionFields', () => {
4849
});
4950
expect(screen.getByText(/Visibility of in-context discussions/)).toBeInTheDocument();
5051
});
51-
});
52+
});

0 commit comments

Comments
 (0)