[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';
|
||||
|
||||
class TestModal extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<Modal
|
||||
show={true}
|
||||
onHide={jest.fn()}
|
||||
>
|
||||
<Modal.Header closeButton={true}/>
|
||||
<Modal.Body/>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
}
|
||||
const TestModal = () => {
|
||||
return (
|
||||
<Modal
|
||||
show={true}
|
||||
onHide={jest.fn()}
|
||||
>
|
||||
<Modal.Header closeButton={true}/>
|
||||
<Modal.Body/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
describe('Reducers.Modals', () => {
|
||||
test('Initial state', () => {
|
||||
|
||||
Ссылка в новой задаче
Block a user