Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/backend/node_modules/@buffetjs/core/src/components/IconLinks/tests/index.test.js
Назад
import React from 'react'; import { mount } from 'enzyme'; import IconLinks from '../index'; describe('<IconLinks />', () => { // eslint-disable-next-line jest/expect-expect it('Should not crash', () => { mount(<IconLinks />); }); it('Should render some icons', () => { const icons = [{ icon: 'trash', onClick: jest.fn() }]; const renderedComponent = mount(<IconLinks links={icons} />); const buttons = renderedComponent.find('button'); buttons.at(0).simulate('click'); expect(icons[0].onClick).toHaveBeenCalled(); expect(buttons.at(0).find('svg').prop('className')).toContain('trash'); }); });
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка