[MM-60079] Converted ./reducers/views/modals.test.tsx class component to functional component (#28033)
* fix: converted class component to functional component * fix: resolved the eslint error --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eb5c746a24
Коммит
073d4ff959
@@ -8,19 +8,17 @@ import {modalState as modalStateReducer} from 'reducers/views/modals';
|
|||||||
|
|
||||||
import {ActionTypes, ModalIdentifiers} from 'utils/constants';
|
import {ActionTypes, ModalIdentifiers} from 'utils/constants';
|
||||||
|
|
||||||
class TestModal extends React.PureComponent {
|
const TestModal = () => {
|
||||||
render() {
|
return (
|
||||||
return (
|
<Modal
|
||||||
<Modal
|
show={true}
|
||||||
show={true}
|
onHide={jest.fn()}
|
||||||
onHide={jest.fn()}
|
>
|
||||||
>
|
<Modal.Header closeButton={true}/>
|
||||||
<Modal.Header closeButton={true}/>
|
<Modal.Body/>
|
||||||
<Modal.Body/>
|
</Modal>
|
||||||
</Modal>
|
);
|
||||||
);
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Reducers.Modals', () => {
|
describe('Reducers.Modals', () => {
|
||||||
test('Initial state', () => {
|
test('Initial state', () => {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user