import React from 'react'; import { fireEvent, render, screen } from '../../../../jest/test-helpers'; import Button from '../button'; describe('); expect(screen.getByRole('button')).toHaveTextContent('children'); }); it('renders the props.text instead of children', () => { const text = 'foo'; const children =

children

; render(); expect(screen.getByRole('button')).toHaveTextContent('foo'); expect(screen.getByRole('button')).not.toHaveTextContent('children'); }); it('render full-width button if block prop given', () => { render(