Sha256: 7a72c0482532179a7a3e70f03e36947e5da95659540e851a9481996628a8952d
Contents?: true
Size: 885 Bytes
Versions: 124
Compression:
Stored size: 885 Bytes
Contents
import { ensureAccessible, renderKit } from '../utilities/test-utils' import Image from './_image' const props = { alt: 'picture of misty forest', data: { testid: 'avatar' }, size: null, url: 'https://unsplash.it/500/400/?image=634', } it('Should be accessible', async () => { ensureAccessible(Image, props) }) test('alt attribute', () => { const kit = renderKit(Image, props) expect(kit).toHaveAttribute('alt', props.alt) }) test('default classname', () => { const kit = renderKit(Image, props) expect(kit).toHaveClass('pb_image_kit lazyload blur_up') }) test('size = xs', () => { const kit = renderKit(Image, props, { size: 'xs' }) expect(kit).toHaveClass('pb_image_kit_xs lazyload blur_up') }) test('rounded = true', () => { const kit = renderKit(Image, props, { rounded: true }) expect(kit).toHaveClass('pb_image_kit lazyload blur_up rounded') })
Version data entries
124 entries across 124 versions & 1 rubygems