Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/backend/node_modules/@buffetjs/core/src/components/Icon/tests/Icon.test.js
Назад
import React from 'react'; import { mount } from 'enzyme'; // import renderer from 'react-test-renderer'; import Icon from '../index'; let renderedComponent; const renderComponent = (props = {}) => mount(<Icon {...props} />); describe('<Icon />', () => { describe('<Icon /> attributes', () => { afterEach(() => { renderedComponent.unmount(); }); it('should have a default icon equals to search', () => { renderedComponent = renderComponent({ icon: 'search' }); const defaultType = 'search'; expect(renderedComponent.at(0).prop('icon')).toBe(defaultType); }); }); // NOTE: disabling this test // describe('<Icon /> icon attributes', () => { // it('should render the search icon', () => { // const tree = renderer.create(<Icon icon="search" />).toJSON(); // expect(tree).toMatchSnapshot(); // }); // it('should render the password icon', () => { // const tree = renderer.create(<Icon icon="password" />).toJSON(); // expect(tree).toMatchSnapshot(); // }); // }); });
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка