Sha256: 2c9ce5ab6b3b59f128e6c5d9b5936e107a461edd911cd980c027099cf7f13769
Contents?: true
Size: 545 Bytes
Versions: 6
Compression:
Stored size: 545 Bytes
Contents
import React from 'react'; import { render, fireEvent, screen } from '@testing-library/react'; import { StartEndDates } from '../StartEndDates'; const setEnds = jest.fn(); const props = { starts: '', setStarts: jest.fn(), ends: 'some-end-date', setEnds, }; describe('StartEndDates', () => { it('never ends', () => { render(<StartEndDates {...props} />); const neverEnds = screen.getByLabelText('Never ends', { selector: 'input', }); fireEvent.click(neverEnds); expect(setEnds).toBeCalledWith(''); }); });
Version data entries
6 entries across 6 versions & 1 rubygems