Sha256: 2207905d6fdcd5dd2225970653fd0a2001a3645c2514efa91cc0149d67d3131d
Contents?: true
Size: 1005 Bytes
Versions: 56
Compression:
Stored size: 1005 Bytes
Contents
import { ensureAccessible, renderKit } from '../utilities/test-utils' import { DateTimeStacked } from '../' /* eslint-disable jsx-control-statements/jsx-jcs-no-undef */ const props = { data: { testid: 'datetimestacked' }, datetime: new Date('Wed Mar 31 2021 12:00:00 GMT-0500'), } test('Kit renders date time', () => { const kit = renderKit(DateTimeStacked, props) expect(kit).toBeInTheDocument() }) it('Should be accessible', async () => { ensureAccessible(DateTimeStacked, props) }) test('renders time in default timezone', () => { const kit = renderKit(DateTimeStacked, props) expect(kit).toHaveTextContent(/Mar311:00pEDT/i) }) test('renders time in timezone', () => { props.timeZone = 'Asia/Tokyo' const kit = renderKit(DateTimeStacked, props) expect(kit).toHaveTextContent(/Mar312:00aJST/i) }) test('renders time in timezone', () => { props.timeZone = 'America/Denver' const kit = renderKit(DateTimeStacked, props) expect(kit).toHaveTextContent(/Mar3111:00aMDT/i) })
Version data entries
56 entries across 56 versions & 1 rubygems