refactor: reverted changes made to satisfy jsx-no-useless-fragment rule
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable react/jsx-no-useless-fragment */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
@@ -128,7 +129,7 @@ function EditableField(props) {
|
||||
options={inputOptions}
|
||||
{...others}
|
||||
/>
|
||||
{others.children}
|
||||
<>{others.children}</>
|
||||
</ValidationFormGroup>
|
||||
<p>
|
||||
<StatefulButton
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/* eslint-disable react/jsx-no-useless-fragment */
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { IntlProvider, injectIntl } from '@edx/frontend-platform/i18n';
|
||||
|
||||
// Testing the modals separately, they just clutter up the snapshots if included here.
|
||||
jest.mock('./ConfirmationModal', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('./SuccessModal', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
|
||||
import { DeleteAccount } from './DeleteAccount'; // eslint-disable-line import/first
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable react/jsx-no-useless-fragment */
|
||||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { Router } from 'react-router-dom';
|
||||
@@ -19,31 +20,31 @@ jest.mock('../VerifiedNameContext', () => {
|
||||
};
|
||||
});
|
||||
jest.mock('../panels/ReviewRequirementsPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/RequestCameraAccessPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/PortraitPhotoContextPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/TakePortraitPhotoPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/IdContextPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/GetNameIdPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/TakeIdPhotoPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/SummaryPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
jest.mock('../panels/SubmittedPanel', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
|
||||
const IntlIdVerificationPage = injectIntl(IdVerificationPage);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable react/jsx-no-useless-fragment */
|
||||
import React, { useContext } from 'react';
|
||||
import { render, cleanup, waitFor } from '@testing-library/react';
|
||||
|
||||
@@ -7,7 +8,9 @@ import { VerifiedNameContext, VerifiedNameContextProvider } from '../VerifiedNam
|
||||
function VerifiedNameContextTestComponent() {
|
||||
const { verifiedName } = useContext(VerifiedNameContext);
|
||||
return (
|
||||
verifiedName && (<div data-testid="verified-name">{verifiedName}</div>)
|
||||
<>
|
||||
{verifiedName && (<div data-testid="verified-name">{verifiedName}</div>)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable react/jsx-no-useless-fragment */
|
||||
import React from 'react';
|
||||
import { Router } from 'react-router-dom';
|
||||
import { createMemoryHistory } from 'history';
|
||||
@@ -13,7 +14,7 @@ jest.mock('@edx/frontend-platform/analytics', () => ({
|
||||
}));
|
||||
|
||||
jest.mock('../../Camera', () => function () {
|
||||
return null;
|
||||
return <></>;
|
||||
});
|
||||
|
||||
const history = createMemoryHistory();
|
||||
|
||||
Reference in New Issue
Block a user